@bkm016/basalt 0.1.0 → 0.1.1
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/chunk-09vr609h.js +2 -0
- package/chunk-0qqb6v41.js +3753 -0
- package/{chunk-1egbcp85.js → chunk-0yytz0r1.js} +7 -7
- package/{chunk-rjdhaasf.js → chunk-1aspj1hn.js} +2 -2
- package/chunk-1b7gbe8g.js +10 -0
- package/{chunk-665jzf2w.js → chunk-1v7st27a.js} +11 -11
- package/{chunk-5fdgy0q2.js → chunk-2bb01ddq.js} +10 -10
- package/{chunk-kjr81mrd.js → chunk-2wkaw73s.js} +3 -3
- package/{chunk-xhk54h2q.js → chunk-3m7qwfm3.js} +4 -4
- package/{chunk-0tdv0t5q.js → chunk-44ek81ad.js} +2 -2
- package/{chunk-wc5j0hfw.js → chunk-45cz26ap.js} +2 -2
- package/{chunk-0rya8cxe.js → chunk-6e49xsf5.js} +2 -2
- package/{chunk-bj14jshr.js → chunk-6qertm2t.js} +2 -2
- package/chunk-8dxzqwq3.js +2 -0
- package/chunk-9mmz6wt3.js +2 -0
- package/{chunk-3jz9g8ab.js → chunk-a3tqx584.js} +3 -3
- package/{chunk-y9xe9ct2.js → chunk-a8nyk4k9.js} +1 -1
- package/{chunk-qffb7een.js → chunk-bhqyxyap.js} +2 -2
- package/chunk-bpw6q7g0.js +3 -0
- package/{chunk-tnrqkc7b.js → chunk-cv5wsd9m.js} +1 -1
- package/{chunk-5wp4egky.js → chunk-dhm42y04.js} +2 -2
- package/{chunk-913tfr9c.js → chunk-exnn1867.js} +1 -1
- package/{chunk-7yw8aa5j.js → chunk-f7egr55n.js} +4 -4
- package/{chunk-kgdrjqsy.js → chunk-g2t6t8fk.js} +2 -2
- package/{chunk-qbf8x2ft.js → chunk-h6sw8fbt.js} +1 -1
- package/chunk-jhd54p1b.js +3 -0
- package/{chunk-x9982ek7.js → chunk-kf8hq21a.js} +2 -2
- package/{chunk-zt1wvkyf.js → chunk-kfq8wyd3.js} +1 -1
- package/chunk-nt2gntad.js +2 -0
- package/{chunk-wd9zxhza.js → chunk-pmc3y1z8.js} +1 -1
- package/{chunk-3p7q2pyp.js → chunk-pvncysbb.js} +1 -1
- package/chunk-q8zx3kt6.js +2 -0
- package/{chunk-sf13azm4.js → chunk-qczbfccb.js} +3 -3
- package/chunk-qx0m82rw.js +2 -0
- package/chunk-ry0z4ev6.js +2 -0
- package/{chunk-g2k3yhgh.js → chunk-s37s3k24.js} +3 -3
- package/{chunk-y8ced1jm.js → chunk-sh74qzvt.js} +1 -1
- package/{chunk-9y69ywyg.js → chunk-szat3vp4.js} +2 -2
- package/chunk-tvm4zmgj.js +3 -0
- package/{chunk-8wjgbd9k.js → chunk-vgvq3q12.js} +2 -2
- package/{chunk-d913kpyw.js → chunk-vv7fp27r.js} +2 -2
- package/{chunk-97kjn55j.js → chunk-wjd9fr23.js} +1 -1
- package/{chunk-6gyhajhx.js → chunk-x3dnb9sz.js} +2 -2
- package/chunk-xysny0ve.js +3 -0
- package/{chunk-qcwnkr5y.js → chunk-yskm0hsy.js} +1 -1
- package/{chunk-sytpmbfp.js → chunk-zef13k3h.js} +36 -36
- package/cli.js +89 -0
- package/compiled.js +12 -3762
- package/package.json +4 -3
- package/ui-test-worker.js +31 -31
- package/web/{chunk-rkesqprv.js → chunk-05w4fyzc.js} +1 -1
- package/web/{chunk-ev1g5cqw.js → chunk-0vt9fg48.js} +1 -1
- package/web/{chunk-55kw67nv.js → chunk-22a4ety5.js} +1 -1
- package/web/{chunk-hryhthxr.js → chunk-2m12wyrb.js} +1 -1
- package/web/{chunk-svmhj9hd.js → chunk-2msj52w6.js} +1 -1
- package/web/{chunk-rsn8j7xv.js → chunk-2ps6mepk.js} +1 -1
- package/web/chunk-2pver6r4.js +1 -0
- package/web/{chunk-1t760bg0.js → chunk-2scce33n.js} +1 -1
- package/web/chunk-37ajk6zg.js +2 -0
- package/web/{chunk-haphmhz8.js → chunk-3ee04tmm.js} +1 -1
- package/web/{chunk-c85wxnpw.js → chunk-3jhyzmnf.js} +1 -1
- package/web/{chunk-pz934t6t.js → chunk-45fzdcgz.js} +1 -1
- package/web/{chunk-ea9swkkt.js → chunk-4ks96e4r.js} +1 -1
- package/web/{chunk-0k0hvh59.js → chunk-4v8en1yw.js} +1 -1
- package/web/chunk-4wkm9fda.js +1 -0
- package/web/{chunk-zk2f7x5e.js → chunk-5vw9rs4r.js} +1 -1
- package/web/{chunk-mq92vqb1.js → chunk-70qwwwak.js} +1 -1
- package/web/{chunk-4b5mt5pd.js → chunk-8p4tc9f4.js} +1 -1
- package/web/{chunk-3pm4645m.js → chunk-90kp4pnz.js} +1 -1
- package/web/{chunk-ytpwz01r.js → chunk-9an7cjd9.js} +1 -1
- package/web/{chunk-29e1trsq.js → chunk-9dxjafp2.js} +1 -1
- package/web/{chunk-ykxpb3wv.js → chunk-9p12mgs6.js} +1 -1
- package/web/{chunk-sc63gh9d.js → chunk-9yakxvjb.js} +1 -1
- package/web/{chunk-fdkp6tzq.js → chunk-a1z5qx1r.js} +1 -1
- package/web/{chunk-v6v831tc.js → chunk-a3verqw9.js} +1 -1
- package/web/{chunk-vqjs551t.js → chunk-a5x2zveg.js} +1 -1
- package/web/chunk-amzgyy1k.js +1 -0
- package/web/{chunk-e5rmr47n.js → chunk-b1pe46zz.js} +1 -1
- package/web/{chunk-1v3d60pp.js → chunk-b4wbk7vc.js} +1 -1
- package/web/{chunk-3bqh2dkw.js → chunk-bc78qf1m.js} +1 -1
- package/web/{chunk-tfyxp2qs.js → chunk-bgnnrpna.js} +1 -1
- package/web/{chunk-vadqkz3x.js → chunk-bj90t5gh.js} +1 -1
- package/web/{chunk-mdsgekpk.js → chunk-bjkc94mv.js} +1 -1
- package/web/{chunk-3cfabjey.js → chunk-ca682sm6.js} +1 -1
- package/web/chunk-cff5hcm8.js +8 -0
- package/web/{chunk-942prjb6.js → chunk-dt462hk9.js} +1 -1
- package/web/{chunk-bwyw10wx.js → chunk-dzwxgqgm.js} +1 -1
- package/web/{chunk-bhe4jzha.js → chunk-e32y85kx.js} +1 -1
- package/web/{chunk-v47rhg7b.js → chunk-e53wfgb8.js} +1 -1
- package/web/{chunk-ezyvv4ab.js → chunk-e6jxqbv7.js} +1 -1
- package/web/chunk-esp1mmgr.js +1 -0
- package/web/chunk-ew3cgdtd.js +1 -0
- package/web/{chunk-svdzmaxb.js → chunk-f26smjjf.js} +1 -1
- package/web/{chunk-jvhmna7z.js → chunk-fk0dh93x.js} +1 -1
- package/web/{chunk-3pf33xsm.js → chunk-fm2ybfj5.js} +1 -1
- package/web/{chunk-6r912gfj.js → chunk-fscafg24.js} +1 -1
- package/web/{chunk-canbct9d.js → chunk-fz06t6km.js} +1 -1
- package/web/{chunk-rz6wwdd5.js → chunk-g4azyef7.js} +1 -1
- package/web/chunk-gjq1pxw3.js +1 -0
- package/web/{chunk-0xck277j.js → chunk-gqw3f02j.js} +1 -1
- package/web/chunk-h5ejbf6e.js +1 -0
- package/web/{chunk-kbtbbarw.js → chunk-hev4hq89.js} +1 -1
- package/web/chunk-jjh5jvva.js +1 -0
- package/web/{chunk-a3xt6840.js → chunk-jrcyc9s9.js} +1 -1
- package/web/{chunk-4y2td14d.js → chunk-jwzd9tzk.js} +1 -1
- package/web/chunk-k5btcvbg.js +1 -0
- package/web/{chunk-z1jtv4c0.js → chunk-kdyjnwdx.js} +1 -1
- package/web/chunk-kpvgecwy.js +1 -0
- package/web/chunk-kq40ss39.js +1 -0
- package/web/{chunk-ghxe4gam.js → chunk-p3b9crsa.js} +1 -1
- package/web/{chunk-zakv2xdf.js → chunk-pf2ab8p8.js} +1 -1
- package/web/{chunk-d4d3mnak.js → chunk-q0p5xqe1.js} +1 -1
- package/web/{chunk-5hex8g0y.js → chunk-q5ke7a33.js} +1 -1
- package/web/chunk-q7dsnvpf.js +1 -0
- package/web/{chunk-vfqe8298.js → chunk-qd8bxxdj.js} +1 -1
- package/web/{chunk-3ahpr030.js → chunk-qefasa1j.js} +1 -1
- package/web/{chunk-x9q4kh67.js → chunk-qh7265qw.js} +1 -1
- package/web/{chunk-hejz98gw.js → chunk-qnaqf0cr.js} +1 -1
- package/web/chunk-rg426vkf.js +1 -0
- package/web/{chunk-s8vapqgr.js → chunk-rpmpttbk.js} +1 -1
- package/web/chunk-scpwc9ev.js +1 -0
- package/web/{chunk-b5brnfv9.js → chunk-ss1bcb0n.js} +1 -1
- package/web/chunk-ssy07dd2.js +1 -0
- package/web/{chunk-gxn0bey7.js → chunk-taynqrgq.js} +2 -2
- package/web/chunk-tgpbhzn9.js +1 -0
- package/web/{chunk-ejd43q75.js → chunk-tmvakq7n.js} +2 -2
- package/web/{chunk-nerx2q12.js → chunk-tqmwd9qp.js} +1 -1
- package/web/{chunk-n5fn9khr.js → chunk-v28fx2nd.js} +1 -1
- package/web/{chunk-32ezm0ry.js → chunk-vt40e1kp.js} +39 -39
- package/web/chunk-w53rba6g.js +1 -0
- package/web/chunk-w86n42dy.js +1 -0
- package/web/{chunk-ktqt87qw.js → chunk-w880psmw.js} +1 -1
- package/web/{chunk-p8y0hjx9.js → chunk-wptv8atc.js} +1 -1
- package/web/{chunk-g9qv15hq.js → chunk-xbty0rv7.js} +1 -1
- package/web/{chunk-7f0m2yrd.js → chunk-xjxv8dg8.js} +1 -1
- package/web/{chunk-x3zwjkwg.js → chunk-xrxne80b.js} +1 -1
- package/web/{chunk-jtwhjp20.js → chunk-y0m8hrwz.js} +2 -2
- package/web/{chunk-6atq9qtt.js → chunk-y49fhfda.js} +1 -1
- package/web/{chunk-1x8fn8w9.js → chunk-yd46jhqv.js} +1 -1
- package/web/{chunk-ngpq43vn.js → chunk-z7dcbxws.js} +1 -1
- package/web/chunk-zde7mj43.js +1 -0
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-1fv27j4b.js +0 -3
- package/chunk-356q8e0y.js +0 -10
- package/chunk-b9bg5fhd.js +0 -2
- package/chunk-j2x0g1vg.js +0 -2
- package/chunk-k0t23cmx.js +0 -2
- package/chunk-m38ber71.js +0 -2
- package/chunk-rad3dm0q.js +0 -2
- package/chunk-tjpvayr1.js +0 -2
- package/chunk-ve7qx8wm.js +0 -3
- package/chunk-yb1jxgnk.js +0 -2
- package/web/chunk-00mq7bhx.js +0 -1
- package/web/chunk-0atfn8jf.js +0 -1
- package/web/chunk-310yey4q.js +0 -1
- package/web/chunk-3hvgs5aw.js +0 -1
- package/web/chunk-3kh6zefg.js +0 -1
- package/web/chunk-401v5ht6.js +0 -8
- package/web/chunk-5r5kv4gh.js +0 -1
- package/web/chunk-95q1bwxn.js +0 -1
- package/web/chunk-9s7c178f.js +0 -1
- package/web/chunk-benmmqt2.js +0 -1
- package/web/chunk-bgqdcnke.js +0 -1
- package/web/chunk-eqegxtdt.js +0 -1
- package/web/chunk-gmfp7fg4.js +0 -1
- package/web/chunk-gxay64d5.js +0 -1
- package/web/chunk-jg6nzn6q.js +0 -1
- package/web/chunk-kx2xk3bb.js +0 -1
- package/web/chunk-vfqdy860.js +0 -1
- package/web/chunk-x59p8sg2.js +0 -1
- package/web/chunk-y7z144e3.js +0 -1
- package/web/chunk-ydgqrfvw.js +0 -2
- package/web/chunk-yj1a2d37.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h,o,g,i,a,v,t,n,_,yt}from"./chunk-32ezm0ry.js";var U="__chat__";function T(s){if(!Number.isFinite(s)||s<=0)return"0";if(s<1000)return Math.round(s).toString();if(s<1e6)return`${(s/1000).toFixed(1)}K`;if(s<1e9)return`${(s/1e6).toFixed(2)}M`;return`${(s/1e9).toFixed(2)}B`}function B(s){let c=Number.isFinite(s)?Math.max(0,s):0;return Math.round(c).toLocaleString("en-US")}function P(s){if(!Number.isFinite(s)||s<=0)return"0s";if(s<1000)return"<1s";if(s<60000)return`${Math.floor(s/1000)}s`;if(s<3600000){let u=Math.floor(s/1000),e=Math.floor(u/60),d=u%60;return d>0?`${e}m ${d}s`:`${e}m`}if(s<259200000){let u=Math.floor(s/60000),e=Math.floor(u/60),d=u%60;return d>0?`${e}h ${d}m`:`${e}h`}let c=Math.floor(s/3600000),x=Math.floor(c/24),p=c%24;return p>0?`${x}d ${p}h`:`${x}d`}function X(s){if(!Number.isFinite(s)||s<=0)return"0s";if(s<1000)return"<1s";if(s<60000)return`${Math.round(s/1000)}s`;if(s<3600000)return`${Math.round(s/60000)}m`;if(s<86400000){let p=s/3600000;return`${p>=10?Math.round(p).toString():p.toFixed(1).replace(/\.0$/,"")}h`}let c=s/86400000;return`${c>=10?Math.round(c).toString():c.toFixed(1).replace(/\.0$/,"")}d`}function L(s,c=1){if(!Number.isFinite(s)||s<=0)return"0%";let x=10**-c/100;if(s<x)return`<${(x*100).toFixed(c)}%`;return`${(s*100).toFixed(c)}%`}function K(s){if(!Number.isFinite(s)||s<=0)return"0 B";if(s<1024)return`${Math.round(s)} B`;if(s<1048576)return`${(s/1024).toFixed(1)} KB`;if(s<1073741824)return`${(s/1048576).toFixed(2)} MB`;return`${(s/1073741824).toFixed(2)} GB`}function G(s){let c=s.split("-"),x=c[1],p=c[2];if(x!==void 0&&p!==void 0)return`${x}/${p}`;return s}function Y(s){let c=s.split("-"),x=c[0],p=c[1],u=c[2];if(x===void 0||p===void 0||u===void 0)return s;let e=Number(x),d=Number(p)-1,b=Number(u),w=new Date(Date.UTC(e,d,b)),R=["周日","周一","周二","周三","周四","周五","周六"],M=w.getUTCDay(),F=R[M]??"";return`${s} ${F}`}function ee(s,c=Date.now()){if(s===null||s===void 0||!Number.isFinite(s)||s<=0)return"从未";let x=Math.max(0,c-s);if(x<60000)return"刚刚";if(x<3600000)return`${Math.max(1,Math.floor(x/60000))} 分钟前`;if(x<86400000)return`${Math.max(1,Math.floor(x/3600000))} 小时前`;if(x<2592000000)return`${Math.max(1,Math.floor(x/86400000))} 天前`;let p=new Date(s),u=p.getFullYear(),e=String(p.getMonth()+1).padStart(2,"0"),d=String(p.getDate()).padStart(2,"0");return`${u}-${e}-${d}`}function te(s){let{projects:c,selectedProjectID:x,onSelectProject:p}=s,{style:u}=_();if(c.length===0)return t("div",{className:u("surface.empty"),children:"暂无项目统计数据"});return t("div",{className:"divide-y divide-line",children:c.map((e)=>{let d=e.projectID??U,b=x===d,w=Math.max(e.tokenShare>0?1:0,e.tokenShare*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t("span",{className:"font-medium text-sm text-ink truncate",children:e.name}),t("span",{className:u("control.badge","font-mono truncate max-w-[240px]"),title:e.directory||"未绑定项目目录",children:e.directory||"独立会话"}),t("button",{type:"button",onClick:()=>p(b?null:d),className:"rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-accent/10 transition-colors cursor-pointer shrink-0",children:b?"取消筛选":"筛选"})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[t("span",{className:"text-xs font-medium text-ink",title:B(e.totalTokens),children:T(e.totalTokens)}),n("span",{className:"text-[11px] text-faint",children:["(",L(e.tokenShare),")"]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${w}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(e.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(e.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(e.cacheReadTokens)}),n("span",{className:"text-faint",children:[" (",L(e.cacheHitRate),")"]})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(e.activeDurationMs)})]}),n("span",{children:[t("span",{className:"text-ink",children:e.sessionCount.toLocaleString()})," 会话"]}),n("span",{children:["工具 ",t("span",{className:"text-ink",children:e.toolCalls.toLocaleString()})," 次"]})]})]})]},d)})})}function ae(s){let{models:c}=s,{ModelIcon:x,style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无模型调用数据"});return t("div",{className:"divide-y divide-line",children:c.map((u)=>{let e=Math.max(u.share>0?1:0,u.share*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t(x,{modelID:u.model,className:"size-4 shrink-0"}),t("span",{className:"font-mono text-sm font-medium text-ink truncate",children:u.shortName}),t("span",{className:p("control.badge","font-mono shrink-0"),children:u.provider})]}),n("div",{className:"flex items-baseline gap-2.5 font-mono tabular-nums shrink-0",children:[u.avgTps!==null&&n("span",{className:"text-[11px] text-dim",children:[u.avgTps.toFixed(1)," tok/s"]}),n("span",{className:"text-xs font-medium text-ink",title:B(u.totalTokens),children:[T(u.totalTokens)," ",n("span",{className:"text-[11px] font-normal text-faint",children:["(",L(u.share),")"]})]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${e}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(u.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(u.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(u.cacheReadTokens)}),n("span",{className:"text-faint",children:[" (",L(u.cacheHitRate),")"]})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:[t("span",{className:"text-ink",children:u.turns.toLocaleString()})," 轮",u.errors>0?n("span",{className:"text-danger",children:[" (",u.errors," 错)"]}):null]}),n("span",{children:["工具 ",t("span",{className:"text-ink",children:u.toolCalls.toLocaleString()})," 次"]}),u.generationMs>0&&n("span",{children:["推理 ",t("span",{className:"text-ink",children:X(u.generationMs)})]})]})]})]},u.model)})})}function ne(s){let{tools:c}=s,{StatusChip:x,style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无工具调用数据"});return t("div",{className:"divide-y divide-line",children:c.map((u)=>{let e=Math.max(u.share>0?1:0,u.share*100),d=u.successRate>=0.95?"success":u.successRate>=0.8?"warning":"danger",b=Math.max(0,u.calls-u.errors),w=u.calls>0?Math.round(u.outputBytes/u.calls):0;return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t("span",{className:"font-mono text-sm font-medium text-ink truncate",children:u.name}),n(x,{tone:d,children:["成功率 ",L(u.successRate)]})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[n("span",{className:"text-xs font-medium text-ink",children:[u.calls.toLocaleString()," 次"]}),n("span",{className:"text-[11px] text-faint",children:["(",L(u.share),")"]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${e}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["成功 ",t("span",{className:"text-ink",children:b.toLocaleString()})," 次"]}),n("span",{children:["失败 ",t("span",{className:u.errors>0?"text-danger":"text-ink",children:u.errors.toLocaleString()})," 次"]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["累计输出 ",t("span",{className:"text-ink",children:K(u.outputBytes)})]}),n("span",{children:["单次均值 ",t("span",{className:"text-ink",children:K(w)})]})]})]})]},u.name)})})}function se(s){let{sessions:c,onOpenSession:x}=s,{style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无高消耗会话记录"});let u=Math.max(1,...c.map((e)=>e.totalTokens));return t("div",{className:"divide-y divide-line",children:c.map((e)=>{let d=u>0?Math.max(1,e.totalTokens/u*100):0,b=e.model.split("/").pop()??e.model;return n("button",{type:"button",onClick:()=>x(e.id),className:"group block w-full p-4 text-left space-y-2.5 hover:bg-raised/40 transition-colors cursor-pointer",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t("span",{className:"font-medium text-sm text-ink truncate group-hover:text-accent transition-colors",children:e.title.trim()||"新会话"}),t("span",{className:p("control.badge","font-mono truncate max-w-[140px] shrink-0"),title:e.projectName,children:e.projectName}),e.kind==="sub"&&t("span",{className:"rounded bg-accent/15 px-1.5 py-0.5 text-[10.5px] text-accent shrink-0",children:"子代理"}),e.archivedAt!==null&&t("span",{className:p("control.badge","shrink-0"),children:"已归档"})]}),n("div",{className:"flex items-center gap-1.5 font-mono tabular-nums shrink-0",children:[t("span",{className:"text-xs font-medium text-ink",title:B(e.totalTokens),children:T(e.totalTokens)}),t(yt,{className:"size-3.5 text-faint group-hover:text-ink group-hover:translate-x-0.5 transition-all"})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${d}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(e.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(e.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(e.cacheReadTokens)})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[t("span",{className:"text-ink",children:b}),n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(e.activeDurationMs)})]}),n("span",{children:[t("span",{className:"text-ink",children:e.assistantTurns})," 轮"]}),t("span",{className:"text-faint",children:ee(e.updated)})]})]})]},e.id)})})}var oe=[{value:"tokens",label:"Token 用量"},{value:"duration",label:"活跃耗时"},{value:"activity",label:"交互轮次"}];function re(s){let{cn:c,Segmented:x,SettingGroup:p,style:u}=_(),{daily:e}=s,[d,b]=a("tokens"),[w,R]=a(null),M=g(()=>e.some((r)=>r.totalTokens>0||r.activeDurationMs>0||r.runs>0),[e]),F=g(()=>{if(e.length===0)return{totalText:"0",avgText:"0",peakDate:"—",peakValueText:"0"};if(d==="tokens"){let S=e.reduce((C,I)=>C+I.totalTokens,0),j=e.filter((C)=>C.totalTokens>0).length,y=e[0];for(let C of e)if(!y||C.totalTokens>y.totalTokens)y=C;return{totalText:T(S),totalFullText:B(S),avgText:j>0?T(Math.round(S/j)):"0",peakDate:y&&y.totalTokens>0?G(y.date):"—",peakValueText:y&&y.totalTokens>0?T(y.totalTokens):"0"}}if(d==="duration"){let S=e.reduce((C,I)=>C+I.activeDurationMs,0),j=e.filter((C)=>C.activeDurationMs>0).length,y=e[0];for(let C of e)if(!y||C.activeDurationMs>y.activeDurationMs)y=C;return{totalText:P(S),totalFullText:P(S),avgText:j>0?P(Math.round(S/j)):"0s",peakDate:y&&y.activeDurationMs>0?G(y.date):"—",peakValueText:y&&y.activeDurationMs>0?P(y.activeDurationMs):"0s"}}let r=e.reduce((S,j)=>S+j.assistantTurns,0),l=e.reduce((S,j)=>S+j.userMessages,0),f=r+l,N=e.filter((S)=>S.assistantTurns>0||S.userMessages>0).length,k=e[0];for(let S of e){let j=k?k.assistantTurns+k.userMessages:0;if(!k||S.assistantTurns+S.userMessages>j)k=S}let A=k?k.assistantTurns+k.userMessages:0;return{totalText:`${f.toLocaleString()} 轮`,totalFullText:`助手 ${r.toLocaleString()} 轮 · 用户 ${l.toLocaleString()} 问`,avgText:N>0?`${(f/N).toFixed(1)} 轮/天`:"0 轮/天",peakDate:k&&A>0?G(k.date):"—",peakValueText:k&&A>0?`${A.toLocaleString()} 轮`:"0 轮"}},[e,d]),D=g(()=>{if(w){let r=e.find((l)=>l.date===w);if(r)return r}for(let r=e.length-1;r>=0;r--){let l=e[r];if(l&&(l.totalTokens>0||l.activeDurationMs>0||l.runs>0))return l}return e[e.length-1]},[e,w]),z=g(()=>{if(d==="tokens")return Math.max(1,...e.map((r)=>r.totalTokens));if(d==="duration")return Math.max(1000,...e.map((r)=>r.activeDurationMs));return Math.max(1,...e.map((r)=>r.assistantTurns+r.userMessages))},[e,d]),m=g(()=>{if(e.length<=7)return e.map((f)=>f.date);let r=6,l=[];for(let f=0;f<r;f++){let N=Math.round(f*(e.length-1)/(r-1)),k=e[N];if(k)l.push(k.date)}return l},[e]);if(!M)return t(p,{title:"每日趋势",action:t(x,{value:d,onChange:(r)=>b(r),options:oe}),children:t("div",{className:u("surface.empty"),children:"当前时间范围内暂无活跃数据"})});return t(p,{title:"每日趋势",action:t(x,{value:d,onChange:(r)=>b(r),options:oe}),children:n("div",{className:"p-4 space-y-4",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 font-mono text-dim tabular-nums",children:[n("span",{children:["汇总 ",t("span",{className:"text-ink",children:F.totalText})]}),n("span",{children:["日均 ",t("span",{className:"text-ink",children:F.avgText})]}),n("span",{children:["峰值 ",t("span",{className:"text-ink",children:F.peakValueText}),F.peakDate!=="—"?n("span",{className:"text-faint",children:[" (",F.peakDate,")"]}):null]})]}),n("div",{className:"flex items-center gap-3 text-[11px] text-dim",children:[d==="tokens"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent/40"}),"缓存读"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"输入"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"输出"]})]}),d==="duration"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"工作调度"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"模型推理"]})]}),d==="activity"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"助手回复"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"用户提问"]})]})]})]}),n("div",{className:"relative h-44 w-full pt-1",children:[n("div",{className:"absolute inset-0 flex flex-col justify-between pointer-events-none pb-5 text-[10px] text-faint/60",children:[t("div",{className:"border-b border-line/40 w-full"}),t("div",{className:"border-b border-line/30 w-full"}),t("div",{className:"border-b border-line/40 w-full"})]}),n("section",{"aria-label":"每日趋势柱状序列",className:"relative h-full flex flex-col justify-between",onMouseLeave:()=>R(null),children:[t("div",{className:"flex-1 flex items-end gap-1 sm:gap-1.5 pb-2",children:e.map((r)=>{let l=r.totalTokens;if(d==="duration")l=r.activeDurationMs;else if(d==="activity")l=r.assistantTurns+r.userMessages;let f=l<=0,N=f?0:Math.max(3,Math.min(100,l/z*100)),k=D?.date===r.date;return n("button",{type:"button","aria-label":`${r.date} 统计数据`,className:"flex-1 h-full flex flex-col justify-end items-center group cursor-pointer relative min-w-0 bg-transparent p-0 border-0 focus:outline-hidden",onMouseEnter:()=>R(r.date),onFocus:()=>R(r.date),onClick:()=>R(r.date),children:[t("div",{className:c("absolute inset-y-0 w-full rounded-xs transition-colors pointer-events-none",k?"bg-accent/10":"group-hover:bg-raised/60")}),f?t("div",{className:"h-1 w-full max-w-[24px] rounded-full bg-raised group-hover:bg-dim/30"}):n("div",{className:"w-full max-w-[24px] rounded-t-xs overflow-hidden flex flex-col justify-end transition-all duration-150",style:{height:`${N}%`},children:[d==="tokens"&&n(v,{children:[r.outputTokens>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${r.outputTokens/r.totalTokens*100}%`}}),r.inputTokens+r.cacheWriteTokens>0&&t("div",{className:"bg-accent transition-all duration-200",style:{height:`${(r.inputTokens+r.cacheWriteTokens)/r.totalTokens*100}%`}}),r.cacheReadTokens>0&&t("div",{className:"bg-accent/40 transition-all duration-200",style:{height:`${r.cacheReadTokens/r.totalTokens*100}%`}})]}),d==="duration"&&n(v,{children:[r.generationMs>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${Math.min(100,r.generationMs/Math.max(1,r.activeDurationMs)*100)}%`}}),t("div",{className:"bg-accent flex-1 transition-all duration-200"})]}),d==="activity"&&n(v,{children:[r.userMessages>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${r.userMessages/Math.max(1,r.assistantTurns+r.userMessages)*100}%`}}),t("div",{className:"bg-accent flex-1 transition-all duration-200"})]})]}),k&&t("div",{className:"absolute -bottom-1 size-1 rounded-full bg-accent"})]},r.date)})}),t("div",{className:c("flex items-center pt-1.5 text-[10px] text-faint font-mono tabular-nums",e.length<=7?"gap-1 sm:gap-1.5":"justify-between"),children:m.map((r)=>t("div",{className:c("whitespace-nowrap",e.length<=7&&"flex-1 text-center"),children:G(r)},r))})]})]}),t("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line pt-3 font-mono text-xs tabular-nums",children:D?n(v,{children:[t("span",{className:"text-ink",children:Y(D.date)}),n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 text-dim",children:[n("span",{children:["Token ",t("span",{className:"text-ink",children:T(D.totalTokens)})]}),n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(D.activeDurationMs)})]}),n("span",{children:["交互 ",n("span",{className:"text-ink",children:[D.assistantTurns+D.userMessages," 轮"]})]}),n("span",{children:["工具 ",n("span",{className:"text-ink",children:[D.toolCalls," 次"]})]})]})]}):t("span",{className:"font-sans text-faint",children:"悬停柱状图查看单日明细"})})]})})}function ie(s){let{cn:c,SettingGroup:x}=_(),{daily:p,hourly:u}=s,[e,d]=a(null),b=g(()=>{let l=new Map;for(let N of u)l.set(N.hour,N);let f=[];for(let N=0;N<24;N++){let k=l.get(N);if(k)f.push(k);else f.push({hour:N,totalTokens:0,activeDurationMs:0,userMessages:0,assistantTurns:0,runs:0})}return f},[u]),w=g(()=>{let l=b[0];for(let f of b)if(!l||f.totalTokens>l.totalTokens)l=f;return l&&l.totalTokens>0?l:null},[b]),R=g(()=>b.reduce((l,f)=>l+f.totalTokens,0),[b]),M=g(()=>Math.max(1,...b.map((l)=>l.totalTokens)),[b]),F=g(()=>{if(R<=0)return 0;return b.filter((f)=>f.hour>=8&&f.hour<20).reduce((f,N)=>f+N.totalTokens,0)/R},[b,R]),D=g(()=>Math.max(1,...p.map((l)=>l.totalTokens)),[p]),z=g(()=>{let l=0,f=0;for(let N of p)if(N.totalTokens>0||N.activeDurationMs>0||N.runs>0){if(f++,f>l)l=f}else f=0;return l},[p]),m=g(()=>p.filter((l)=>l.totalTokens>0||l.activeDurationMs>0||l.runs>0).length,[p]),r=e!==null?b[e]:w;return n(x,{title:"活跃时段与热力",action:n("div",{className:"flex items-center gap-3 font-mono text-xs text-faint tabular-nums",children:[n("span",{children:["日间占比 ",L(F)]}),n("span",{children:["连续活跃 ",z," 天"]}),n("span",{children:["活跃 ",m,"/",p.length," 天"]})]}),children:[n("div",{className:"p-4 space-y-3",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[t("span",{className:"text-dim",children:"24 小时分布"}),r?n("div",{className:"flex items-center gap-3 font-mono text-dim tabular-nums",children:[n("span",{className:"text-ink",children:[e!==null?"时段 ":"高峰 ",String(r.hour).padStart(2,"0"),":00 -"," ",String((r.hour+1)%24).padStart(2,"0"),":00"]}),t("span",{className:"text-ink",children:T(r.totalTokens)}),r.activeDurationMs>0&&t("span",{children:P(r.activeDurationMs)})]}):t("span",{className:"text-faint",children:"暂无时段分布"})]}),n("section",{"aria-label":"24 小时活跃分布序列",className:"h-28 w-full flex flex-col justify-between pt-1",onMouseLeave:()=>d(null),children:[t("div",{className:"flex-1 flex items-end gap-1.5 pb-1.5",children:b.map((l)=>{let f=w?.hour===l.hour,N=e===l.hour,k=l.totalTokens>0?Math.max(6,l.totalTokens/M*100):0,A=`${String(l.hour).padStart(2,"0")}:00 - ${String((l.hour+1)%24).padStart(2,"0")}:00
|
|
1
|
+
import{h,o,g,i,a,v,t,n,_,yt}from"./chunk-vt40e1kp.js";var U="__chat__";function T(s){if(!Number.isFinite(s)||s<=0)return"0";if(s<1000)return Math.round(s).toString();if(s<1e6)return`${(s/1000).toFixed(1)}K`;if(s<1e9)return`${(s/1e6).toFixed(2)}M`;return`${(s/1e9).toFixed(2)}B`}function B(s){let c=Number.isFinite(s)?Math.max(0,s):0;return Math.round(c).toLocaleString("en-US")}function P(s){if(!Number.isFinite(s)||s<=0)return"0s";if(s<1000)return"<1s";if(s<60000)return`${Math.floor(s/1000)}s`;if(s<3600000){let u=Math.floor(s/1000),e=Math.floor(u/60),d=u%60;return d>0?`${e}m ${d}s`:`${e}m`}if(s<259200000){let u=Math.floor(s/60000),e=Math.floor(u/60),d=u%60;return d>0?`${e}h ${d}m`:`${e}h`}let c=Math.floor(s/3600000),x=Math.floor(c/24),p=c%24;return p>0?`${x}d ${p}h`:`${x}d`}function X(s){if(!Number.isFinite(s)||s<=0)return"0s";if(s<1000)return"<1s";if(s<60000)return`${Math.round(s/1000)}s`;if(s<3600000)return`${Math.round(s/60000)}m`;if(s<86400000){let p=s/3600000;return`${p>=10?Math.round(p).toString():p.toFixed(1).replace(/\.0$/,"")}h`}let c=s/86400000;return`${c>=10?Math.round(c).toString():c.toFixed(1).replace(/\.0$/,"")}d`}function L(s,c=1){if(!Number.isFinite(s)||s<=0)return"0%";let x=10**-c/100;if(s<x)return`<${(x*100).toFixed(c)}%`;return`${(s*100).toFixed(c)}%`}function K(s){if(!Number.isFinite(s)||s<=0)return"0 B";if(s<1024)return`${Math.round(s)} B`;if(s<1048576)return`${(s/1024).toFixed(1)} KB`;if(s<1073741824)return`${(s/1048576).toFixed(2)} MB`;return`${(s/1073741824).toFixed(2)} GB`}function G(s){let c=s.split("-"),x=c[1],p=c[2];if(x!==void 0&&p!==void 0)return`${x}/${p}`;return s}function Y(s){let c=s.split("-"),x=c[0],p=c[1],u=c[2];if(x===void 0||p===void 0||u===void 0)return s;let e=Number(x),d=Number(p)-1,b=Number(u),w=new Date(Date.UTC(e,d,b)),R=["周日","周一","周二","周三","周四","周五","周六"],M=w.getUTCDay(),F=R[M]??"";return`${s} ${F}`}function ee(s,c=Date.now()){if(s===null||s===void 0||!Number.isFinite(s)||s<=0)return"从未";let x=Math.max(0,c-s);if(x<60000)return"刚刚";if(x<3600000)return`${Math.max(1,Math.floor(x/60000))} 分钟前`;if(x<86400000)return`${Math.max(1,Math.floor(x/3600000))} 小时前`;if(x<2592000000)return`${Math.max(1,Math.floor(x/86400000))} 天前`;let p=new Date(s),u=p.getFullYear(),e=String(p.getMonth()+1).padStart(2,"0"),d=String(p.getDate()).padStart(2,"0");return`${u}-${e}-${d}`}function te(s){let{projects:c,selectedProjectID:x,onSelectProject:p}=s,{style:u}=_();if(c.length===0)return t("div",{className:u("surface.empty"),children:"暂无项目统计数据"});return t("div",{className:"divide-y divide-line",children:c.map((e)=>{let d=e.projectID??U,b=x===d,w=Math.max(e.tokenShare>0?1:0,e.tokenShare*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t("span",{className:"font-medium text-sm text-ink truncate",children:e.name}),t("span",{className:u("control.badge","font-mono truncate max-w-[240px]"),title:e.directory||"未绑定项目目录",children:e.directory||"独立会话"}),t("button",{type:"button",onClick:()=>p(b?null:d),className:"rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-accent/10 transition-colors cursor-pointer shrink-0",children:b?"取消筛选":"筛选"})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[t("span",{className:"text-xs font-medium text-ink",title:B(e.totalTokens),children:T(e.totalTokens)}),n("span",{className:"text-[11px] text-faint",children:["(",L(e.tokenShare),")"]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${w}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(e.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(e.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(e.cacheReadTokens)}),n("span",{className:"text-faint",children:[" (",L(e.cacheHitRate),")"]})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(e.activeDurationMs)})]}),n("span",{children:[t("span",{className:"text-ink",children:e.sessionCount.toLocaleString()})," 会话"]}),n("span",{children:["工具 ",t("span",{className:"text-ink",children:e.toolCalls.toLocaleString()})," 次"]})]})]})]},d)})})}function ae(s){let{models:c}=s,{ModelIcon:x,style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无模型调用数据"});return t("div",{className:"divide-y divide-line",children:c.map((u)=>{let e=Math.max(u.share>0?1:0,u.share*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t(x,{modelID:u.model,className:"size-4 shrink-0"}),t("span",{className:"font-mono text-sm font-medium text-ink truncate",children:u.shortName}),t("span",{className:p("control.badge","font-mono shrink-0"),children:u.provider})]}),n("div",{className:"flex items-baseline gap-2.5 font-mono tabular-nums shrink-0",children:[u.avgTps!==null&&n("span",{className:"text-[11px] text-dim",children:[u.avgTps.toFixed(1)," tok/s"]}),n("span",{className:"text-xs font-medium text-ink",title:B(u.totalTokens),children:[T(u.totalTokens)," ",n("span",{className:"text-[11px] font-normal text-faint",children:["(",L(u.share),")"]})]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${e}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(u.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(u.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(u.cacheReadTokens)}),n("span",{className:"text-faint",children:[" (",L(u.cacheHitRate),")"]})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:[t("span",{className:"text-ink",children:u.turns.toLocaleString()})," 轮",u.errors>0?n("span",{className:"text-danger",children:[" (",u.errors," 错)"]}):null]}),n("span",{children:["工具 ",t("span",{className:"text-ink",children:u.toolCalls.toLocaleString()})," 次"]}),u.generationMs>0&&n("span",{children:["推理 ",t("span",{className:"text-ink",children:X(u.generationMs)})]})]})]})]},u.model)})})}function ne(s){let{tools:c}=s,{StatusChip:x,style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无工具调用数据"});return t("div",{className:"divide-y divide-line",children:c.map((u)=>{let e=Math.max(u.share>0?1:0,u.share*100),d=u.successRate>=0.95?"success":u.successRate>=0.8?"warning":"danger",b=Math.max(0,u.calls-u.errors),w=u.calls>0?Math.round(u.outputBytes/u.calls):0;return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t("span",{className:"font-mono text-sm font-medium text-ink truncate",children:u.name}),n(x,{tone:d,children:["成功率 ",L(u.successRate)]})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[n("span",{className:"text-xs font-medium text-ink",children:[u.calls.toLocaleString()," 次"]}),n("span",{className:"text-[11px] text-faint",children:["(",L(u.share),")"]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${e}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["成功 ",t("span",{className:"text-ink",children:b.toLocaleString()})," 次"]}),n("span",{children:["失败 ",t("span",{className:u.errors>0?"text-danger":"text-ink",children:u.errors.toLocaleString()})," 次"]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["累计输出 ",t("span",{className:"text-ink",children:K(u.outputBytes)})]}),n("span",{children:["单次均值 ",t("span",{className:"text-ink",children:K(w)})]})]})]})]},u.name)})})}function se(s){let{sessions:c,onOpenSession:x}=s,{style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无高消耗会话记录"});let u=Math.max(1,...c.map((e)=>e.totalTokens));return t("div",{className:"divide-y divide-line",children:c.map((e)=>{let d=u>0?Math.max(1,e.totalTokens/u*100):0,b=e.model.split("/").pop()??e.model;return n("button",{type:"button",onClick:()=>x(e.id),className:"group block w-full p-4 text-left space-y-2.5 hover:bg-raised/40 transition-colors cursor-pointer",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t("span",{className:"font-medium text-sm text-ink truncate group-hover:text-accent transition-colors",children:e.title.trim()||"新会话"}),t("span",{className:p("control.badge","font-mono truncate max-w-[140px] shrink-0"),title:e.projectName,children:e.projectName}),e.kind==="sub"&&t("span",{className:"rounded bg-accent/15 px-1.5 py-0.5 text-[10.5px] text-accent shrink-0",children:"子代理"}),e.archivedAt!==null&&t("span",{className:p("control.badge","shrink-0"),children:"已归档"})]}),n("div",{className:"flex items-center gap-1.5 font-mono tabular-nums shrink-0",children:[t("span",{className:"text-xs font-medium text-ink",title:B(e.totalTokens),children:T(e.totalTokens)}),t(yt,{className:"size-3.5 text-faint group-hover:text-ink group-hover:translate-x-0.5 transition-all"})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${d}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(e.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(e.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(e.cacheReadTokens)})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[t("span",{className:"text-ink",children:b}),n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(e.activeDurationMs)})]}),n("span",{children:[t("span",{className:"text-ink",children:e.assistantTurns})," 轮"]}),t("span",{className:"text-faint",children:ee(e.updated)})]})]})]},e.id)})})}var oe=[{value:"tokens",label:"Token 用量"},{value:"duration",label:"活跃耗时"},{value:"activity",label:"交互轮次"}];function re(s){let{cn:c,Segmented:x,SettingGroup:p,style:u}=_(),{daily:e}=s,[d,b]=a("tokens"),[w,R]=a(null),M=g(()=>e.some((r)=>r.totalTokens>0||r.activeDurationMs>0||r.runs>0),[e]),F=g(()=>{if(e.length===0)return{totalText:"0",avgText:"0",peakDate:"—",peakValueText:"0"};if(d==="tokens"){let S=e.reduce((C,I)=>C+I.totalTokens,0),j=e.filter((C)=>C.totalTokens>0).length,y=e[0];for(let C of e)if(!y||C.totalTokens>y.totalTokens)y=C;return{totalText:T(S),totalFullText:B(S),avgText:j>0?T(Math.round(S/j)):"0",peakDate:y&&y.totalTokens>0?G(y.date):"—",peakValueText:y&&y.totalTokens>0?T(y.totalTokens):"0"}}if(d==="duration"){let S=e.reduce((C,I)=>C+I.activeDurationMs,0),j=e.filter((C)=>C.activeDurationMs>0).length,y=e[0];for(let C of e)if(!y||C.activeDurationMs>y.activeDurationMs)y=C;return{totalText:P(S),totalFullText:P(S),avgText:j>0?P(Math.round(S/j)):"0s",peakDate:y&&y.activeDurationMs>0?G(y.date):"—",peakValueText:y&&y.activeDurationMs>0?P(y.activeDurationMs):"0s"}}let r=e.reduce((S,j)=>S+j.assistantTurns,0),l=e.reduce((S,j)=>S+j.userMessages,0),f=r+l,N=e.filter((S)=>S.assistantTurns>0||S.userMessages>0).length,k=e[0];for(let S of e){let j=k?k.assistantTurns+k.userMessages:0;if(!k||S.assistantTurns+S.userMessages>j)k=S}let A=k?k.assistantTurns+k.userMessages:0;return{totalText:`${f.toLocaleString()} 轮`,totalFullText:`助手 ${r.toLocaleString()} 轮 · 用户 ${l.toLocaleString()} 问`,avgText:N>0?`${(f/N).toFixed(1)} 轮/天`:"0 轮/天",peakDate:k&&A>0?G(k.date):"—",peakValueText:k&&A>0?`${A.toLocaleString()} 轮`:"0 轮"}},[e,d]),D=g(()=>{if(w){let r=e.find((l)=>l.date===w);if(r)return r}for(let r=e.length-1;r>=0;r--){let l=e[r];if(l&&(l.totalTokens>0||l.activeDurationMs>0||l.runs>0))return l}return e[e.length-1]},[e,w]),z=g(()=>{if(d==="tokens")return Math.max(1,...e.map((r)=>r.totalTokens));if(d==="duration")return Math.max(1000,...e.map((r)=>r.activeDurationMs));return Math.max(1,...e.map((r)=>r.assistantTurns+r.userMessages))},[e,d]),m=g(()=>{if(e.length<=7)return e.map((f)=>f.date);let r=6,l=[];for(let f=0;f<r;f++){let N=Math.round(f*(e.length-1)/(r-1)),k=e[N];if(k)l.push(k.date)}return l},[e]);if(!M)return t(p,{title:"每日趋势",action:t(x,{value:d,onChange:(r)=>b(r),options:oe}),children:t("div",{className:u("surface.empty"),children:"当前时间范围内暂无活跃数据"})});return t(p,{title:"每日趋势",action:t(x,{value:d,onChange:(r)=>b(r),options:oe}),children:n("div",{className:"p-4 space-y-4",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 font-mono text-dim tabular-nums",children:[n("span",{children:["汇总 ",t("span",{className:"text-ink",children:F.totalText})]}),n("span",{children:["日均 ",t("span",{className:"text-ink",children:F.avgText})]}),n("span",{children:["峰值 ",t("span",{className:"text-ink",children:F.peakValueText}),F.peakDate!=="—"?n("span",{className:"text-faint",children:[" (",F.peakDate,")"]}):null]})]}),n("div",{className:"flex items-center gap-3 text-[11px] text-dim",children:[d==="tokens"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent/40"}),"缓存读"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"输入"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"输出"]})]}),d==="duration"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"工作调度"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"模型推理"]})]}),d==="activity"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"助手回复"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"用户提问"]})]})]})]}),n("div",{className:"relative h-44 w-full pt-1",children:[n("div",{className:"absolute inset-0 flex flex-col justify-between pointer-events-none pb-5 text-[10px] text-faint/60",children:[t("div",{className:"border-b border-line/40 w-full"}),t("div",{className:"border-b border-line/30 w-full"}),t("div",{className:"border-b border-line/40 w-full"})]}),n("section",{"aria-label":"每日趋势柱状序列",className:"relative h-full flex flex-col justify-between",onMouseLeave:()=>R(null),children:[t("div",{className:"flex-1 flex items-end gap-1 sm:gap-1.5 pb-2",children:e.map((r)=>{let l=r.totalTokens;if(d==="duration")l=r.activeDurationMs;else if(d==="activity")l=r.assistantTurns+r.userMessages;let f=l<=0,N=f?0:Math.max(3,Math.min(100,l/z*100)),k=D?.date===r.date;return n("button",{type:"button","aria-label":`${r.date} 统计数据`,className:"flex-1 h-full flex flex-col justify-end items-center group cursor-pointer relative min-w-0 bg-transparent p-0 border-0 focus:outline-hidden",onMouseEnter:()=>R(r.date),onFocus:()=>R(r.date),onClick:()=>R(r.date),children:[t("div",{className:c("absolute inset-y-0 w-full rounded-xs transition-colors pointer-events-none",k?"bg-accent/10":"group-hover:bg-raised/60")}),f?t("div",{className:"h-1 w-full max-w-[24px] rounded-full bg-raised group-hover:bg-dim/30"}):n("div",{className:"w-full max-w-[24px] rounded-t-xs overflow-hidden flex flex-col justify-end transition-all duration-150",style:{height:`${N}%`},children:[d==="tokens"&&n(v,{children:[r.outputTokens>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${r.outputTokens/r.totalTokens*100}%`}}),r.inputTokens+r.cacheWriteTokens>0&&t("div",{className:"bg-accent transition-all duration-200",style:{height:`${(r.inputTokens+r.cacheWriteTokens)/r.totalTokens*100}%`}}),r.cacheReadTokens>0&&t("div",{className:"bg-accent/40 transition-all duration-200",style:{height:`${r.cacheReadTokens/r.totalTokens*100}%`}})]}),d==="duration"&&n(v,{children:[r.generationMs>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${Math.min(100,r.generationMs/Math.max(1,r.activeDurationMs)*100)}%`}}),t("div",{className:"bg-accent flex-1 transition-all duration-200"})]}),d==="activity"&&n(v,{children:[r.userMessages>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${r.userMessages/Math.max(1,r.assistantTurns+r.userMessages)*100}%`}}),t("div",{className:"bg-accent flex-1 transition-all duration-200"})]})]}),k&&t("div",{className:"absolute -bottom-1 size-1 rounded-full bg-accent"})]},r.date)})}),t("div",{className:c("flex items-center pt-1.5 text-[10px] text-faint font-mono tabular-nums",e.length<=7?"gap-1 sm:gap-1.5":"justify-between"),children:m.map((r)=>t("div",{className:c("whitespace-nowrap",e.length<=7&&"flex-1 text-center"),children:G(r)},r))})]})]}),t("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line pt-3 font-mono text-xs tabular-nums",children:D?n(v,{children:[t("span",{className:"text-ink",children:Y(D.date)}),n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 text-dim",children:[n("span",{children:["Token ",t("span",{className:"text-ink",children:T(D.totalTokens)})]}),n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(D.activeDurationMs)})]}),n("span",{children:["交互 ",n("span",{className:"text-ink",children:[D.assistantTurns+D.userMessages," 轮"]})]}),n("span",{children:["工具 ",n("span",{className:"text-ink",children:[D.toolCalls," 次"]})]})]})]}):t("span",{className:"font-sans text-faint",children:"悬停柱状图查看单日明细"})})]})})}function ie(s){let{cn:c,SettingGroup:x}=_(),{daily:p,hourly:u}=s,[e,d]=a(null),b=g(()=>{let l=new Map;for(let N of u)l.set(N.hour,N);let f=[];for(let N=0;N<24;N++){let k=l.get(N);if(k)f.push(k);else f.push({hour:N,totalTokens:0,activeDurationMs:0,userMessages:0,assistantTurns:0,runs:0})}return f},[u]),w=g(()=>{let l=b[0];for(let f of b)if(!l||f.totalTokens>l.totalTokens)l=f;return l&&l.totalTokens>0?l:null},[b]),R=g(()=>b.reduce((l,f)=>l+f.totalTokens,0),[b]),M=g(()=>Math.max(1,...b.map((l)=>l.totalTokens)),[b]),F=g(()=>{if(R<=0)return 0;return b.filter((f)=>f.hour>=8&&f.hour<20).reduce((f,N)=>f+N.totalTokens,0)/R},[b,R]),D=g(()=>Math.max(1,...p.map((l)=>l.totalTokens)),[p]),z=g(()=>{let l=0,f=0;for(let N of p)if(N.totalTokens>0||N.activeDurationMs>0||N.runs>0){if(f++,f>l)l=f}else f=0;return l},[p]),m=g(()=>p.filter((l)=>l.totalTokens>0||l.activeDurationMs>0||l.runs>0).length,[p]),r=e!==null?b[e]:w;return n(x,{title:"活跃时段与热力",action:n("div",{className:"flex items-center gap-3 font-mono text-xs text-faint tabular-nums",children:[n("span",{children:["日间占比 ",L(F)]}),n("span",{children:["连续活跃 ",z," 天"]}),n("span",{children:["活跃 ",m,"/",p.length," 天"]})]}),children:[n("div",{className:"p-4 space-y-3",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[t("span",{className:"text-dim",children:"24 小时分布"}),r?n("div",{className:"flex items-center gap-3 font-mono text-dim tabular-nums",children:[n("span",{className:"text-ink",children:[e!==null?"时段 ":"高峰 ",String(r.hour).padStart(2,"0"),":00 -"," ",String((r.hour+1)%24).padStart(2,"0"),":00"]}),t("span",{className:"text-ink",children:T(r.totalTokens)}),r.activeDurationMs>0&&t("span",{children:P(r.activeDurationMs)})]}):t("span",{className:"text-faint",children:"暂无时段分布"})]}),n("section",{"aria-label":"24 小时活跃分布序列",className:"h-28 w-full flex flex-col justify-between pt-1",onMouseLeave:()=>d(null),children:[t("div",{className:"flex-1 flex items-end gap-1.5 pb-1.5",children:b.map((l)=>{let f=w?.hour===l.hour,N=e===l.hour,k=l.totalTokens>0?Math.max(6,l.totalTokens/M*100):0,A=`${String(l.hour).padStart(2,"0")}:00 - ${String((l.hour+1)%24).padStart(2,"0")}:00
|
|
2
2
|
消耗: ${B(l.totalTokens)} Token
|
|
3
3
|
耗时: ${P(l.activeDurationMs)}
|
|
4
4
|
助手轮次: ${l.assistantTurns} 轮`;return t("button",{type:"button","aria-label":`${String(l.hour).padStart(2,"0")}:00 时段统计`,className:"flex-1 h-full flex flex-col justify-end items-center group relative cursor-pointer bg-transparent p-0 border-0 focus:outline-hidden",title:A,onMouseEnter:()=>d(l.hour),onFocus:()=>d(l.hour),onClick:()=>d(l.hour),children:k>0?t("div",{className:c("w-full max-w-[20px] rounded-t-xs transition-all duration-200",f||N?"bg-accent":"bg-accent/55 group-hover:bg-accent"),style:{height:`${k}%`}}):t("div",{className:"h-1 w-full max-w-[20px] rounded-full bg-raised group-hover:bg-dim/30"})},l.hour)})}),n("div",{className:"flex justify-between items-center text-[10px] text-faint font-mono pt-1.5 border-t border-line/40",children:[t("span",{children:"00:00"}),t("span",{children:"04:00"}),t("span",{children:"08:00"}),t("span",{children:"12:00"}),t("span",{children:"16:00"}),t("span",{children:"20:00"}),t("span",{children:"23:00"})]})]})]}),n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"text-xs text-dim",children:["自然日热力 (",p.length," 天)"]}),t("div",{className:"flex flex-wrap items-center gap-1.5",children:p.map((l)=>{let f="bg-raised";if(l.totalTokens>0){let k=l.totalTokens/D;if(k<=0.33)f="bg-accent/30";else if(k<=0.66)f="bg-accent/60";else f="bg-accent"}let N=`${Y(l.date)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-y0m8hrwz.js";import"./chunk-p3b9crsa.js";import{ko}from"./chunk-a3verqw9.js";import"./chunk-2m12wyrb.js";import"./chunk-37ajk6zg.js";import"./chunk-ss1bcb0n.js";import"./chunk-hev4hq89.js";export{ko as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
1
|
+
import{e}from"./chunk-y0m8hrwz.js";function W(c,i){if(c.accDescr)i.setAccDescription?.(c.accDescr);if(c.accTitle)i.setAccTitle?.(c.accTitle);if(c.title)i.setDiagramTitle?.(c.title)}e(W,"populateCommonDb");
|
|
2
2
|
export{W};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,r,Le,O,Xt,y,C,S,E,T,A,I,L,s,p,N,Fe,le,ae,ie,Ye,he,ge}from"./chunk-jtwhjp20.js";import{Mt}from"./chunk-ghxe4gam.js";import{je}from"./chunk-hryhthxr.js";import{fe}from"./chunk-b5brnfv9.js";import{oe}from"./chunk-kbtbbarw.js";var tt=function(){var i=e(function(W,b,k,m){for(k=k||{},m=W.length;m--;k[W[m]]=b);return k},"o"),n=[1,18],l=[1,19],u=[1,20],o=[1,41],d=[1,26],f=[1,42],h=[1,24],D=[1,25],F=[1,32],R=[1,33],J=[1,34],_=[1,45],Oe=[1,35],we=[1,36],Me=[1,37],Pe=[1,38],Ve=[1,27],Re=[1,28],Ge=[1,29],Ue=[1,30],ze=[1,31],x=[1,44],v=[1,46],w=[1,43],M=[1,47],Ke=[1,9],g=[1,8,9],be=[1,58],ke=[1,59],me=[1,60],Ce=[1,61],Ee=[1,62],We=[1,63],Qe=[1,64],G=[1,8,9,41],st=[1,77],H=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],Te=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ye=[13,60,86,100,102,103],Z=[13,60,73,74,86,100,102,103],it=[13,60,68,69,70,71,72,86,100,102,103],De=[1,103],ee=[1,121],te=[1,117],se=[1,113],re=[1,119],ne=[1,114],ue=[1,115],ce=[1,116],de=[1,118],pe=[1,120],at=[22,50,60,61,82,86,87,88,89,90],rt=[1,128],Be=[12,39],Xe=[1,8,9,39,41,44,46],_e=[1,8,9,22],nt=[1,153],lt=[1,8,9,61],Y=[1,8,9,22,50,60,61,82,86,87,88,89,90],He={trace:e(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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE: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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,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:e(function(b,k,m,c,B,t,Ae){var a=t.length-1;switch(B){case 8:this.$=t[a-1];break;case 9:case 10:case 13:case 15:this.$=t[a];break;case 11:case 14:this.$=t[a-2]+"."+t[a];break;case 12:case 16:this.$=t[a-1]+t[a];break;case 17:case 18:this.$=t[a-1]+"~"+t[a]+"~";break;case 19:c.addRelation(t[a]);break;case 20:t[a-1].title=c.cleanupLabel(t[a]),c.addRelation(t[a-1]);break;case 31:this.$=t[a].trim(),c.setAccTitle(this.$);break;case 32:case 33:this.$=t[a].trim(),c.setAccDescription(this.$);break;case 34:c.addClassesToNamespace(t[a-3],t[a-1][0],t[a-1][1]),c.popNamespace();break;case 35:c.addClassesToNamespace(t[a-4],t[a-1][0],t[a-1][1]),c.popNamespace();break;case 36:this.$=c.addNamespace(t[a]);break;case 37:this.$=c.addNamespace(t[a-1],t[a]);break;case 38:this.$=[[t[a]],[]];break;case 39:this.$=[[t[a-1]],[]];break;case 40:t[a][0].unshift(t[a-2]),this.$=t[a];break;case 41:this.$=[[],[t[a]]];break;case 42:this.$=[[],[t[a-1]]];break;case 43:t[a][1].unshift(t[a-2]),this.$=t[a];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=t[a];break;case 48:c.setCssClass(t[a-2],t[a]);break;case 49:c.addMembers(t[a-3],t[a-1]);break;case 51:c.setCssClass(t[a-5],t[a-3]),c.addMembers(t[a-5],t[a-1]);break;case 52:c.addAnnotation(t[a-3],t[a-1]);break;case 53:c.addAnnotation(t[a-6],t[a-4]),c.addMembers(t[a-6],t[a-1]);break;case 54:c.addAnnotation(t[a-5],t[a-3]);break;case 55:this.$=t[a],c.addClass(t[a]);break;case 56:this.$=t[a-1],c.addClass(t[a-1]),c.setClassLabel(t[a-1],t[a]);break;case 60:c.addAnnotation(t[a],t[a-2]);break;case 61:case 74:this.$=[t[a]];break;case 62:t[a].push(t[a-1]),this.$=t[a];break;case 63:break;case 64:c.addMember(t[a-1],c.cleanupLabel(t[a]));break;case 65:break;case 66:break;case 67:this.$={id1:t[a-2],id2:t[a],relation:t[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:t[a-3],id2:t[a],relation:t[a-1],relationTitle1:t[a-2],relationTitle2:"none"};break;case 69:this.$={id1:t[a-3],id2:t[a],relation:t[a-2],relationTitle1:"none",relationTitle2:t[a-1]};break;case 70:this.$={id1:t[a-4],id2:t[a],relation:t[a-2],relationTitle1:t[a-3],relationTitle2:t[a-1]};break;case 71:this.$=c.addNote(t[a],t[a-1]);break;case 72:this.$=c.addNote(t[a]);break;case 73:this.$=t[a-2],c.defineClass(t[a-1],t[a]);break;case 75:this.$=t[a-2].concat([t[a]]);break;case 76:c.setDirection("TB");break;case 77:c.setDirection("BT");break;case 78:c.setDirection("RL");break;case 79:c.setDirection("LR");break;case 80:this.$={type1:t[a-2],type2:t[a],lineType:t[a-1]};break;case 81:this.$={type1:"none",type2:t[a],lineType:t[a-1]};break;case 82:this.$={type1:t[a-1],type2:"none",lineType:t[a]};break;case 83:this.$={type1:"none",type2:"none",lineType:t[a]};break;case 84:this.$=c.relationType.AGGREGATION;break;case 85:this.$=c.relationType.EXTENSION;break;case 86:this.$=c.relationType.COMPOSITION;break;case 87:this.$=c.relationType.DEPENDENCY;break;case 88:this.$=c.relationType.LOLLIPOP;break;case 89:this.$=c.lineType.LINE;break;case 90:this.$=c.lineType.DOTTED_LINE;break;case 91:case 97:this.$=t[a-2],c.setClickEvent(t[a-1],t[a]);break;case 92:case 98:this.$=t[a-3],c.setClickEvent(t[a-2],t[a-1]),c.setTooltip(t[a-2],t[a]);break;case 93:this.$=t[a-2],c.setLink(t[a-1],t[a]);break;case 94:this.$=t[a-3],c.setLink(t[a-2],t[a-1],t[a]);break;case 95:this.$=t[a-3],c.setLink(t[a-2],t[a-1]),c.setTooltip(t[a-2],t[a]);break;case 96:this.$=t[a-4],c.setLink(t[a-3],t[a-2],t[a]),c.setTooltip(t[a-3],t[a-1]);break;case 99:this.$=t[a-3],c.setClickEvent(t[a-2],t[a-1],t[a]);break;case 100:this.$=t[a-4],c.setClickEvent(t[a-3],t[a-2],t[a-1]),c.setTooltip(t[a-3],t[a]);break;case 101:this.$=t[a-3],c.setLink(t[a-2],t[a]);break;case 102:this.$=t[a-4],c.setLink(t[a-3],t[a-1],t[a]);break;case 103:this.$=t[a-4],c.setLink(t[a-3],t[a-1]),c.setTooltip(t[a-3],t[a]);break;case 104:this.$=t[a-5],c.setLink(t[a-4],t[a-2],t[a]),c.setTooltip(t[a-4],t[a-1]);break;case 105:this.$=t[a-2],c.setCssStyle(t[a-1],t[a]);break;case 106:c.setCssClass(t[a-1],t[a]);break;case 107:this.$=[t[a]];break;case 108:t[a-2].push(t[a]),this.$=t[a-2];break;case 110:this.$=t[a-1]+t[a];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:n,35:l,37:u,38:22,42:o,43:23,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Ke,[2,5],{8:[1,48]}),{8:[1,49]},i(g,[2,19],{22:[1,50]}),i(g,[2,21]),i(g,[2,22]),i(g,[2,23]),i(g,[2,24]),i(g,[2,25]),i(g,[2,26]),i(g,[2,27]),i(g,[2,28]),i(g,[2,29]),i(g,[2,30]),{34:[1,51]},{36:[1,52]},i(g,[2,33]),i(g,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:be,69:ke,70:me,71:Ce,72:Ee,73:We,74:Qe}),{39:[1,65]},i(G,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),i(g,[2,65]),i(g,[2,66]),{16:69,60:_,86:x,100:v,102:w},{16:39,17:40,19:70,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:71,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:72,60:_,86:x,100:v,102:w,103:M},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:_,86:x,100:v,102:w,103:M},{13:st,55:76},{58:78,60:[1,79]},i(g,[2,76]),i(g,[2,77]),i(g,[2,78]),i(g,[2,79]),i(H,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:_,86:x,100:v,102:w,103:M}),i(H,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:87,60:_,86:x,100:v,102:w,103:M},i(Te,[2,133]),i(Te,[2,134]),i(Te,[2,135]),i(Te,[2,136]),i([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),i(Ke,[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:88,33:n,35:l,37:u,42:o,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M}),{5:89,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:n,35:l,37:u,38:22,42:o,43:23,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M},i(g,[2,20]),i(g,[2,31]),i(g,[2,32]),{13:[1,91],16:39,17:40,19:90,60:_,86:x,100:v,102:w,103:M},{53:92,66:56,67:57,68:be,69:ke,70:me,71:Ce,72:Ee,73:We,74:Qe},i(g,[2,64]),{67:93,73:We,74:Qe},i(ye,[2,83],{66:94,68:be,69:ke,70:me,71:Ce,72:Ee}),i(Z,[2,84]),i(Z,[2,85]),i(Z,[2,86]),i(Z,[2,87]),i(Z,[2,88]),i(it,[2,89]),i(it,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:o,43:23,48:f,54:F,56:R},{16:100,60:_,86:x,100:v,102:w},{41:[1,102],45:101,51:De},{16:104,60:_,86:x,100:v,102:w},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:ee,50:te,59:110,60:se,82:re,84:111,85:112,86:ne,87:ue,88:ce,89:de,90:pe},{60:[1,122]},{13:st,55:123},i(G,[2,72]),i(G,[2,138]),{22:ee,50:te,59:124,60:se,61:[1,125],82:re,84:111,85:112,86:ne,87:ue,88:ce,89:de,90:pe},i(at,[2,74]),{16:39,17:40,19:126,60:_,86:x,100:v,102:w,103:M},i(H,[2,16]),i(H,[2,17]),i(H,[2,18]),{11:127,12:rt,39:[2,36]},i(Be,[2,9],{16:85,17:86,15:130,18:[1,129],60:_,86:x,100:v,102:w,103:M}),i(Be,[2,10]),i(Xe,[2,55],{11:131,12:rt}),i(Ke,[2,7]),{9:[1,132]},i(_e,[2,67]),{16:39,17:40,19:133,60:_,86:x,100:v,102:w,103:M},{13:[1,135],16:39,17:40,19:134,60:_,86:x,100:v,102:w,103:M},i(ye,[2,82],{66:136,68:be,69:ke,70:me,71:Ce,72:Ee}),i(ye,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:o,43:23,48:f,54:F,56:R},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},i(G,[2,48],{39:[1,142]}),{41:[1,143]},i(G,[2,50]),{41:[2,61],45:144,51:De},{47:[1,145]},{16:39,17:40,19:146,60:_,86:x,100:v,102:w,103:M},i(g,[2,91],{13:[1,147]}),i(g,[2,93],{13:[1,149],77:[1,148]}),i(g,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},i(g,[2,105],{61:nt}),i(lt,[2,107],{85:154,22:ee,50:te,60:se,82:re,86:ne,87:ue,88:ce,89:de,90:pe}),i(Y,[2,109]),i(Y,[2,111]),i(Y,[2,112]),i(Y,[2,113]),i(Y,[2,114]),i(Y,[2,115]),i(Y,[2,116]),i(Y,[2,117]),i(Y,[2,118]),i(Y,[2,119]),i(g,[2,106]),i(G,[2,71]),i(g,[2,73],{61:nt}),{60:[1,155]},i(H,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:_,86:x,100:v,102:w,103:M},i(Be,[2,12]),i(Xe,[2,56]),{1:[2,4]},i(_e,[2,69]),i(_e,[2,68]),{16:39,17:40,19:158,60:_,86:x,100:v,102:w,103:M},i(ye,[2,80]),i(G,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:o,43:23,48:f,54:F,56:R},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:o,43:23,48:f,54:F,56:R},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:o,43:23,48:f,54:F,56:R},{45:163,51:De},i(G,[2,49]),{41:[2,62]},i(G,[2,52],{39:[1,164]}),i(g,[2,60]),i(g,[2,92]),i(g,[2,94]),i(g,[2,95],{77:[1,165]}),i(g,[2,98]),i(g,[2,99],{13:[1,166]}),i(g,[2,101],{13:[1,168],77:[1,167]}),{22:ee,50:te,60:se,82:re,84:169,85:112,86:ne,87:ue,88:ce,89:de,90:pe},i(Y,[2,110]),i(at,[2,75]),{14:[1,170]},i(Be,[2,11]),i(_e,[2,70]),i(G,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:De},i(g,[2,96]),i(g,[2,100]),i(g,[2,102]),i(g,[2,103],{77:[1,174]}),i(lt,[2,108],{85:154,22:ee,50:te,60:se,82:re,86:ne,87:ue,88:ce,89:de,90:pe}),i(Xe,[2,8]),i(G,[2,51]),{41:[1,175]},i(G,[2,54]),i(g,[2,104]),i(G,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(b,k){if(k.recoverable)this.trace(b);else{var m=Error(b);throw m.hash=k,m}},"parseError"),parse:e(function(b){var k=this,m=[0],c=[],B=[null],t=[],Ae=this.table,a="",Ne=0,ut=0,ot=0,kt=2,ct=1,mt=t.slice.call(arguments,1),P=Object.create(this.lexer),Q={yy:{}};for(var qe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,qe))Q.yy[qe]=this.yy[qe];if(P.setInput(b,Q.yy),Q.yy.lexer=P,Q.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var Je=P.yylloc;t.push(Je);var gt=P.options&&P.options.ranges;if(typeof Q.yy.parseError==="function")this.parseError=Q.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ct(z){m.length=m.length-2*z,B.length=B.length-z,t.length=t.length-z}e(Ct,"popStack");function ht(){var z=c.pop()||P.lex()||ct;if(typeof z!=="number"){if(z instanceof Array)c=z,z=c.pop();z=k.symbols_[z]||z}return z}e(ht,"lex");var V,Ze,j,U,Lt,$e,q={},xe,K,dt,ve;while(!0){if(j=m[m.length-1],this.defaultActions[j])U=this.defaultActions[j];else{if(V===null||typeof V>"u")V=ht();U=Ae[j]&&Ae[j][V]}if(typeof U>"u"||!U.length||!U[0]){var et="";ve=[];for(xe in Ae[j])if(this.terminals_[xe]&&xe>kt)ve.push("'"+this.terminals_[xe]+"'");if(P.showPosition)et="Parse error on line "+(Ne+1)+`:
|
|
1
|
+
import{e,r,Le,O,Xt,y,C,S,E,T,A,I,L,s,p,N,Fe,le,ae,ie,Ye,he,ge}from"./chunk-y0m8hrwz.js";import{Mt}from"./chunk-p3b9crsa.js";import{je}from"./chunk-2m12wyrb.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var tt=function(){var i=e(function(W,b,k,m){for(k=k||{},m=W.length;m--;k[W[m]]=b);return k},"o"),n=[1,18],l=[1,19],u=[1,20],o=[1,41],d=[1,26],f=[1,42],h=[1,24],D=[1,25],F=[1,32],R=[1,33],J=[1,34],_=[1,45],Oe=[1,35],we=[1,36],Me=[1,37],Pe=[1,38],Ve=[1,27],Re=[1,28],Ge=[1,29],Ue=[1,30],ze=[1,31],x=[1,44],v=[1,46],w=[1,43],M=[1,47],Ke=[1,9],g=[1,8,9],be=[1,58],ke=[1,59],me=[1,60],Ce=[1,61],Ee=[1,62],We=[1,63],Qe=[1,64],G=[1,8,9,41],st=[1,77],H=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],Te=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ye=[13,60,86,100,102,103],Z=[13,60,73,74,86,100,102,103],it=[13,60,68,69,70,71,72,86,100,102,103],De=[1,103],ee=[1,121],te=[1,117],se=[1,113],re=[1,119],ne=[1,114],ue=[1,115],ce=[1,116],de=[1,118],pe=[1,120],at=[22,50,60,61,82,86,87,88,89,90],rt=[1,128],Be=[12,39],Xe=[1,8,9,39,41,44,46],_e=[1,8,9,22],nt=[1,153],lt=[1,8,9,61],Y=[1,8,9,22,50,60,61,82,86,87,88,89,90],He={trace:e(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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE: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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,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:e(function(b,k,m,c,B,t,Ae){var a=t.length-1;switch(B){case 8:this.$=t[a-1];break;case 9:case 10:case 13:case 15:this.$=t[a];break;case 11:case 14:this.$=t[a-2]+"."+t[a];break;case 12:case 16:this.$=t[a-1]+t[a];break;case 17:case 18:this.$=t[a-1]+"~"+t[a]+"~";break;case 19:c.addRelation(t[a]);break;case 20:t[a-1].title=c.cleanupLabel(t[a]),c.addRelation(t[a-1]);break;case 31:this.$=t[a].trim(),c.setAccTitle(this.$);break;case 32:case 33:this.$=t[a].trim(),c.setAccDescription(this.$);break;case 34:c.addClassesToNamespace(t[a-3],t[a-1][0],t[a-1][1]),c.popNamespace();break;case 35:c.addClassesToNamespace(t[a-4],t[a-1][0],t[a-1][1]),c.popNamespace();break;case 36:this.$=c.addNamespace(t[a]);break;case 37:this.$=c.addNamespace(t[a-1],t[a]);break;case 38:this.$=[[t[a]],[]];break;case 39:this.$=[[t[a-1]],[]];break;case 40:t[a][0].unshift(t[a-2]),this.$=t[a];break;case 41:this.$=[[],[t[a]]];break;case 42:this.$=[[],[t[a-1]]];break;case 43:t[a][1].unshift(t[a-2]),this.$=t[a];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=t[a];break;case 48:c.setCssClass(t[a-2],t[a]);break;case 49:c.addMembers(t[a-3],t[a-1]);break;case 51:c.setCssClass(t[a-5],t[a-3]),c.addMembers(t[a-5],t[a-1]);break;case 52:c.addAnnotation(t[a-3],t[a-1]);break;case 53:c.addAnnotation(t[a-6],t[a-4]),c.addMembers(t[a-6],t[a-1]);break;case 54:c.addAnnotation(t[a-5],t[a-3]);break;case 55:this.$=t[a],c.addClass(t[a]);break;case 56:this.$=t[a-1],c.addClass(t[a-1]),c.setClassLabel(t[a-1],t[a]);break;case 60:c.addAnnotation(t[a],t[a-2]);break;case 61:case 74:this.$=[t[a]];break;case 62:t[a].push(t[a-1]),this.$=t[a];break;case 63:break;case 64:c.addMember(t[a-1],c.cleanupLabel(t[a]));break;case 65:break;case 66:break;case 67:this.$={id1:t[a-2],id2:t[a],relation:t[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:t[a-3],id2:t[a],relation:t[a-1],relationTitle1:t[a-2],relationTitle2:"none"};break;case 69:this.$={id1:t[a-3],id2:t[a],relation:t[a-2],relationTitle1:"none",relationTitle2:t[a-1]};break;case 70:this.$={id1:t[a-4],id2:t[a],relation:t[a-2],relationTitle1:t[a-3],relationTitle2:t[a-1]};break;case 71:this.$=c.addNote(t[a],t[a-1]);break;case 72:this.$=c.addNote(t[a]);break;case 73:this.$=t[a-2],c.defineClass(t[a-1],t[a]);break;case 75:this.$=t[a-2].concat([t[a]]);break;case 76:c.setDirection("TB");break;case 77:c.setDirection("BT");break;case 78:c.setDirection("RL");break;case 79:c.setDirection("LR");break;case 80:this.$={type1:t[a-2],type2:t[a],lineType:t[a-1]};break;case 81:this.$={type1:"none",type2:t[a],lineType:t[a-1]};break;case 82:this.$={type1:t[a-1],type2:"none",lineType:t[a]};break;case 83:this.$={type1:"none",type2:"none",lineType:t[a]};break;case 84:this.$=c.relationType.AGGREGATION;break;case 85:this.$=c.relationType.EXTENSION;break;case 86:this.$=c.relationType.COMPOSITION;break;case 87:this.$=c.relationType.DEPENDENCY;break;case 88:this.$=c.relationType.LOLLIPOP;break;case 89:this.$=c.lineType.LINE;break;case 90:this.$=c.lineType.DOTTED_LINE;break;case 91:case 97:this.$=t[a-2],c.setClickEvent(t[a-1],t[a]);break;case 92:case 98:this.$=t[a-3],c.setClickEvent(t[a-2],t[a-1]),c.setTooltip(t[a-2],t[a]);break;case 93:this.$=t[a-2],c.setLink(t[a-1],t[a]);break;case 94:this.$=t[a-3],c.setLink(t[a-2],t[a-1],t[a]);break;case 95:this.$=t[a-3],c.setLink(t[a-2],t[a-1]),c.setTooltip(t[a-2],t[a]);break;case 96:this.$=t[a-4],c.setLink(t[a-3],t[a-2],t[a]),c.setTooltip(t[a-3],t[a-1]);break;case 99:this.$=t[a-3],c.setClickEvent(t[a-2],t[a-1],t[a]);break;case 100:this.$=t[a-4],c.setClickEvent(t[a-3],t[a-2],t[a-1]),c.setTooltip(t[a-3],t[a]);break;case 101:this.$=t[a-3],c.setLink(t[a-2],t[a]);break;case 102:this.$=t[a-4],c.setLink(t[a-3],t[a-1],t[a]);break;case 103:this.$=t[a-4],c.setLink(t[a-3],t[a-1]),c.setTooltip(t[a-3],t[a]);break;case 104:this.$=t[a-5],c.setLink(t[a-4],t[a-2],t[a]),c.setTooltip(t[a-4],t[a-1]);break;case 105:this.$=t[a-2],c.setCssStyle(t[a-1],t[a]);break;case 106:c.setCssClass(t[a-1],t[a]);break;case 107:this.$=[t[a]];break;case 108:t[a-2].push(t[a]),this.$=t[a-2];break;case 110:this.$=t[a-1]+t[a];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:n,35:l,37:u,38:22,42:o,43:23,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Ke,[2,5],{8:[1,48]}),{8:[1,49]},i(g,[2,19],{22:[1,50]}),i(g,[2,21]),i(g,[2,22]),i(g,[2,23]),i(g,[2,24]),i(g,[2,25]),i(g,[2,26]),i(g,[2,27]),i(g,[2,28]),i(g,[2,29]),i(g,[2,30]),{34:[1,51]},{36:[1,52]},i(g,[2,33]),i(g,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:be,69:ke,70:me,71:Ce,72:Ee,73:We,74:Qe}),{39:[1,65]},i(G,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),i(g,[2,65]),i(g,[2,66]),{16:69,60:_,86:x,100:v,102:w},{16:39,17:40,19:70,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:71,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:72,60:_,86:x,100:v,102:w,103:M},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:_,86:x,100:v,102:w,103:M},{13:st,55:76},{58:78,60:[1,79]},i(g,[2,76]),i(g,[2,77]),i(g,[2,78]),i(g,[2,79]),i(H,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:_,86:x,100:v,102:w,103:M}),i(H,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:87,60:_,86:x,100:v,102:w,103:M},i(Te,[2,133]),i(Te,[2,134]),i(Te,[2,135]),i(Te,[2,136]),i([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),i(Ke,[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:88,33:n,35:l,37:u,42:o,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M}),{5:89,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:n,35:l,37:u,38:22,42:o,43:23,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M},i(g,[2,20]),i(g,[2,31]),i(g,[2,32]),{13:[1,91],16:39,17:40,19:90,60:_,86:x,100:v,102:w,103:M},{53:92,66:56,67:57,68:be,69:ke,70:me,71:Ce,72:Ee,73:We,74:Qe},i(g,[2,64]),{67:93,73:We,74:Qe},i(ye,[2,83],{66:94,68:be,69:ke,70:me,71:Ce,72:Ee}),i(Z,[2,84]),i(Z,[2,85]),i(Z,[2,86]),i(Z,[2,87]),i(Z,[2,88]),i(it,[2,89]),i(it,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:o,43:23,48:f,54:F,56:R},{16:100,60:_,86:x,100:v,102:w},{41:[1,102],45:101,51:De},{16:104,60:_,86:x,100:v,102:w},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:ee,50:te,59:110,60:se,82:re,84:111,85:112,86:ne,87:ue,88:ce,89:de,90:pe},{60:[1,122]},{13:st,55:123},i(G,[2,72]),i(G,[2,138]),{22:ee,50:te,59:124,60:se,61:[1,125],82:re,84:111,85:112,86:ne,87:ue,88:ce,89:de,90:pe},i(at,[2,74]),{16:39,17:40,19:126,60:_,86:x,100:v,102:w,103:M},i(H,[2,16]),i(H,[2,17]),i(H,[2,18]),{11:127,12:rt,39:[2,36]},i(Be,[2,9],{16:85,17:86,15:130,18:[1,129],60:_,86:x,100:v,102:w,103:M}),i(Be,[2,10]),i(Xe,[2,55],{11:131,12:rt}),i(Ke,[2,7]),{9:[1,132]},i(_e,[2,67]),{16:39,17:40,19:133,60:_,86:x,100:v,102:w,103:M},{13:[1,135],16:39,17:40,19:134,60:_,86:x,100:v,102:w,103:M},i(ye,[2,82],{66:136,68:be,69:ke,70:me,71:Ce,72:Ee}),i(ye,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:o,43:23,48:f,54:F,56:R},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},i(G,[2,48],{39:[1,142]}),{41:[1,143]},i(G,[2,50]),{41:[2,61],45:144,51:De},{47:[1,145]},{16:39,17:40,19:146,60:_,86:x,100:v,102:w,103:M},i(g,[2,91],{13:[1,147]}),i(g,[2,93],{13:[1,149],77:[1,148]}),i(g,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},i(g,[2,105],{61:nt}),i(lt,[2,107],{85:154,22:ee,50:te,60:se,82:re,86:ne,87:ue,88:ce,89:de,90:pe}),i(Y,[2,109]),i(Y,[2,111]),i(Y,[2,112]),i(Y,[2,113]),i(Y,[2,114]),i(Y,[2,115]),i(Y,[2,116]),i(Y,[2,117]),i(Y,[2,118]),i(Y,[2,119]),i(g,[2,106]),i(G,[2,71]),i(g,[2,73],{61:nt}),{60:[1,155]},i(H,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:_,86:x,100:v,102:w,103:M},i(Be,[2,12]),i(Xe,[2,56]),{1:[2,4]},i(_e,[2,69]),i(_e,[2,68]),{16:39,17:40,19:158,60:_,86:x,100:v,102:w,103:M},i(ye,[2,80]),i(G,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:o,43:23,48:f,54:F,56:R},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:o,43:23,48:f,54:F,56:R},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:o,43:23,48:f,54:F,56:R},{45:163,51:De},i(G,[2,49]),{41:[2,62]},i(G,[2,52],{39:[1,164]}),i(g,[2,60]),i(g,[2,92]),i(g,[2,94]),i(g,[2,95],{77:[1,165]}),i(g,[2,98]),i(g,[2,99],{13:[1,166]}),i(g,[2,101],{13:[1,168],77:[1,167]}),{22:ee,50:te,60:se,82:re,84:169,85:112,86:ne,87:ue,88:ce,89:de,90:pe},i(Y,[2,110]),i(at,[2,75]),{14:[1,170]},i(Be,[2,11]),i(_e,[2,70]),i(G,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:De},i(g,[2,96]),i(g,[2,100]),i(g,[2,102]),i(g,[2,103],{77:[1,174]}),i(lt,[2,108],{85:154,22:ee,50:te,60:se,82:re,86:ne,87:ue,88:ce,89:de,90:pe}),i(Xe,[2,8]),i(G,[2,51]),{41:[1,175]},i(G,[2,54]),i(g,[2,104]),i(G,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(b,k){if(k.recoverable)this.trace(b);else{var m=Error(b);throw m.hash=k,m}},"parseError"),parse:e(function(b){var k=this,m=[0],c=[],B=[null],t=[],Ae=this.table,a="",Ne=0,ut=0,ot=0,kt=2,ct=1,mt=t.slice.call(arguments,1),P=Object.create(this.lexer),Q={yy:{}};for(var qe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,qe))Q.yy[qe]=this.yy[qe];if(P.setInput(b,Q.yy),Q.yy.lexer=P,Q.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var Je=P.yylloc;t.push(Je);var gt=P.options&&P.options.ranges;if(typeof Q.yy.parseError==="function")this.parseError=Q.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ct(z){m.length=m.length-2*z,B.length=B.length-z,t.length=t.length-z}e(Ct,"popStack");function ht(){var z=c.pop()||P.lex()||ct;if(typeof z!=="number"){if(z instanceof Array)c=z,z=c.pop();z=k.symbols_[z]||z}return z}e(ht,"lex");var V,Ze,j,U,Lt,$e,q={},xe,K,dt,ve;while(!0){if(j=m[m.length-1],this.defaultActions[j])U=this.defaultActions[j];else{if(V===null||typeof V>"u")V=ht();U=Ae[j]&&Ae[j][V]}if(typeof U>"u"||!U.length||!U[0]){var et="";ve=[];for(xe in Ae[j])if(this.terminals_[xe]&&xe>kt)ve.push("'"+this.terminals_[xe]+"'");if(P.showPosition)et="Parse error on line "+(Ne+1)+`:
|
|
2
2
|
`+P.showPosition()+`
|
|
3
3
|
Expecting `+ve.join(", ")+", got '"+(this.terminals_[V]||V)+"'";else et="Parse error on line "+(Ne+1)+": Unexpected "+(V==ct?"end of input":"'"+(this.terminals_[V]||V)+"'");this.parseError(et,{text:P.match,token:this.terminals_[V]||V,line:P.yylineno,loc:Je,expected:ve})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+j+", token: "+V);switch(U[0]){case 1:if(m.push(V),B.push(P.yytext),t.push(P.yylloc),m.push(U[1]),V=null,!Ze){if(ut=P.yyleng,a=P.yytext,Ne=P.yylineno,Je=P.yylloc,ot>0)ot--}else V=Ze,Ze=null;break;case 2:if(K=this.productions_[U[1]][1],q.$=B[B.length-K],q._$={first_line:t[t.length-(K||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(K||1)].first_column,last_column:t[t.length-1].last_column},gt)q._$.range=[t[t.length-(K||1)].range[0],t[t.length-1].range[1]];if($e=this.performAction.apply(q,[a,ut,Ne,Q.yy,U[1],B,t].concat(mt)),typeof $e<"u")return $e;if(K)m=m.slice(0,-1*K*2),B=B.slice(0,-1*K),t=t.slice(0,-1*K);m.push(this.productions_[U[1]][0]),B.push(q.$),t.push(q._$),dt=Ae[m[m.length-2]][m[m.length-1]],m.push(dt);break;case 3:return!0}}return!0},"parse")},ft=function(){var W={EOF:1,parseError:e(function(k,m){if(this.yy.parser)this.yy.parser.parseError(k,m);else throw Error(k)},"parseError"),setInput:e(function(b,k){if(this.yy=k||this.yy||{},this._input=b,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];return this.offset=0,this},"setInput"),input:e(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var k=b.match(/(?:\r\n?|\n).*/g);if(k)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),b},"input"),unput:e(function(b){var k=b.length,m=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1)this.yylineno-=m.length-1;var B=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===c.length?this.yylloc.first_column:0)+c[c.length-m.length].length-m[0].length:this.yylloc.first_column-k},this.options.ranges)this.yylloc.range=[B[0],B[0]+this.yyleng-k];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(b){this.unput(this.match.slice(b))},"less"),pastInput:e(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var b=this.match;if(b.length<20)b+=this._input.substr(0,20-b.length);return(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var b=this.pastInput(),k=Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,r,we,D,b,O,B,C,S,E,T,A,I,L,qn,q,U,qi}from"./chunk-
|
|
1
|
+
import{e,r,we,D,b,O,B,C,S,E,T,A,I,L,qn,q,U,qi}from"./chunk-y0m8hrwz.js";import"./chunk-0mrkjnte.js";import{Xe}from"./chunk-20q90epj.js";import{xt}from"./chunk-90kp4pnz.js";import{Nt}from"./chunk-ry9256r7.js";function Pt(t,i,s){t=+t,i=+i,s=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-t)/s))|0,c=Array(a);while(++n<a)c[n]=t+n*s;return c}function ft(){var t=Xe().unknown(void 0),{domain:i,range:s}=t,n=0,a=1,c,l,f=!1,g=0,y=0,z=0.5;delete t.unknown;function P(){var k=i().length,G=a<n,X=G?a:n,Y=G?n:a;if(c=(Y-X)/Math.max(1,k-g+y*2),f)c=Math.floor(c);if(X+=(Y-X-c*(k-g))*z,l=c*(1-g),f)X=Math.round(X),l=Math.round(l);var j=Pt(k).map(function(it){return X+c*it});return s(G?j.reverse():j)}return t.domain=function(k){return arguments.length?(i(k),P()):i()},t.range=function(k){return arguments.length?([n,a]=k,n=+n,a=+a,P()):[n,a]},t.rangeRound=function(k){return[n,a]=k,n=+n,a=+a,f=!0,P()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(k){return arguments.length?(f=!!k,P()):f},t.padding=function(k){return arguments.length?(g=Math.min(1,y=+k),P()):g},t.paddingInner=function(k){return arguments.length?(g=Math.min(1,k),P()):g},t.paddingOuter=function(k){return arguments.length?(y=+k,P()):y},t.align=function(k){return arguments.length?(z=Math.max(0,Math.min(1,k)),P()):z},t.copy=function(){return ft(i(),[n,a]).round(f).paddingInner(g).paddingOuter(y).align(z)},Nt.apply(P(),arguments)}var Lt=function(){var t=e(function(J,h,u,x){for(u=u||{},x=J.length;x--;u[J[x]]=h);return u},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],g=[1,25],y=[1,26],z=[1,28],P=[1,29],k=[1,30],G=[1,31],X=[1,32],Y=[1,33],j=[1,34],it=[1,35],nt=[1,36],R=[1,37],K=[1,43],d=[1,42],Q=[1,47],Z=[1,50],v=[1,10,12,14,16,18,19,21,23,36,37,38],ot=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],N=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],gt=[1,65],W=[26,28],_={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(h,u,x,p,M,o,rt){var m=o.length-1;switch(M){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[t(i,s,{3:1,4:2,7:4,5:n,36:a,37:c,38:l}),{1:[3]},t(i,s,{4:2,7:4,3:8,5:n,36:a,37:c,38:l}),t(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,s,{4:2,7:4,3:21,5:n,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:g,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:39,13:38,24:K,29:d,30:g,31:40,32:41,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:45,15:44,29:Q,30:g,35:46,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:49,17:48,24:Z,30:g,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:52,17:51,24:Z,30:g,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{20:[1,53]},{22:[1,54]},t(v,[2,18]),{1:[2,2]},t(v,[2,8]),t(v,[2,9]),t(ot,[2,39],{41:55,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R}),t(ot,[2,40]),t(ot,[2,41]),t(N,[2,42]),t(N,[2,44]),t(N,[2,45]),t(N,[2,46]),t(N,[2,47]),t(N,[2,48]),t(N,[2,49]),t(N,[2,50]),t(N,[2,51]),t(N,[2,52]),t(N,[2,53]),t(v,[2,10]),t(v,[2,24],{32:41,31:56,24:K,29:d}),t(v,[2,26]),t(v,[2,27]),{33:[1,57]},{11:59,30:g,34:58,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},t(v,[2,11]),t(v,[2,32],{35:60,29:Q}),t(v,[2,34]),{33:[1,61]},t(v,[2,12]),{17:62,24:Z},{25:63,27:64,29:gt},t(v,[2,14]),{17:66,24:Z},t(v,[2,16]),t(v,[2,17]),t(N,[2,43]),t(v,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(v,[2,33]),{29:[1,70]},t(v,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(W,[2,23],{30:[1,73]}),t(v,[2,15]),t(v,[2,28]),t(v,[2,29]),{11:59,30:g,34:74,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},t(v,[2,35]),t(v,[2,19]),{25:75,27:64,29:gt},t(W,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(h,u){if(u.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=u,x}},"parseError"),parse:e(function(h){var u=this,x=[0],p=[],M=[null],o=[],rt=this.table,m="",yt=0,Ht=0,$t=0,fe=2,Ut=1,pe=o.slice.call(arguments,1),F=Object.create(this.lexer),ht={yy:{}};for(var Rt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Rt))ht.yy[Rt]=this.yy[Rt];if(F.setInput(h,ht.yy),ht.yy.lexer=F,ht.yy.parser=this,typeof F.yylloc>"u")F.yylloc={};var _t=F.yylloc;o.push(_t);var me=F.options&&F.options.ranges;if(typeof ht.yy.parseError==="function")this.parseError=ht.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function be(et){x.length=x.length-2*et,M.length=M.length-et,o.length=o.length-et}e(be,"popStack");function qt(){var et=p.pop()||F.lex()||Ut;if(typeof et!=="number"){if(et instanceof Array)p=et,et=p.pop();et=u.symbols_[et]||et}return et}e(qt,"lex");var H,Tt,lt,tt,Oe,Dt,ut={},wt,at,Gt,kt;while(!0){if(lt=x[x.length-1],this.defaultActions[lt])tt=this.defaultActions[lt];else{if(H===null||typeof H>"u")H=qt();tt=rt[lt]&&rt[lt][H]}if(typeof tt>"u"||!tt.length||!tt[0]){var vt="";kt=[];for(wt in rt[lt])if(this.terminals_[wt]&&wt>fe)kt.push("'"+this.terminals_[wt]+"'");if(F.showPosition)vt="Parse error on line "+(yt+1)+`:
|
|
2
2
|
`+F.showPosition()+`
|
|
3
3
|
Expecting `+kt.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else vt="Parse error on line "+(yt+1)+": Unexpected "+(H==Ut?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(vt,{text:F.match,token:this.terminals_[H]||H,line:F.yylineno,loc:_t,expected:kt})}if(tt[0]instanceof Array&&tt.length>1)throw Error("Parse Error: multiple actions possible at state: "+lt+", token: "+H);switch(tt[0]){case 1:if(x.push(H),M.push(F.yytext),o.push(F.yylloc),x.push(tt[1]),H=null,!Tt){if(Ht=F.yyleng,m=F.yytext,yt=F.yylineno,_t=F.yylloc,$t>0)$t--}else H=Tt,Tt=null;break;case 2:if(at=this.productions_[tt[1]][1],ut.$=M[M.length-at],ut._$={first_line:o[o.length-(at||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(at||1)].first_column,last_column:o[o.length-1].last_column},me)ut._$.range=[o[o.length-(at||1)].range[0],o[o.length-1].range[1]];if(Dt=this.performAction.apply(ut,[m,Ht,yt,ht.yy,tt[1],M,o].concat(pe)),typeof Dt<"u")return Dt;if(at)x=x.slice(0,-1*at*2),M=M.slice(0,-1*at),o=o.slice(0,-1*at);x.push(this.productions_[tt[1]][0]),M.push(ut.$),o.push(ut._$),Gt=rt[x[x.length-2]][x[x.length-1]],x.push(Gt);break;case 3:return!0}}return!0},"parse")},st=function(){var J={EOF:1,parseError:e(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw Error(u)},"parseError"),setInput:e(function(h,u){if(this.yy=u||this.yy||{},this._input=h,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];return this.offset=0,this},"setInput"),input:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);if(u)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),h},"input"),unput:e(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1)this.yylineno-=x.length-1;var M=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[M[0],M[0]+this.yyleng-u];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),u=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,r,Y,u,d,D,O,mt,s,q,et,tt,St,ht,Kt}from"./chunk-
|
|
1
|
+
import{e,r,Y,u,d,D,O,mt,s,q,et,tt,St,ht,Kt}from"./chunk-y0m8hrwz.js";import{je}from"./chunk-2m12wyrb.js";var ae=function(){var t=e(function(R,a,i,c){for(i=i||{},c=R.length;c--;i[R[c]]=a);return i},"o"),f=[1,4],m=[1,13],o=[1,12],y=[1,15],N=[1,16],S=[1,20],g=[1,19],A=[6,7,8],P=[1,26],b=[1,24],B=[1,25],x=[6,7,11],X=[1,31],L=[6,7,11,24],H=[1,6,13,16,17,20,23],k=[1,35],j=[1,36],T=[1,6,7,11,13,16,17,20,23],K=[1,38],F={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(a,i,c,l,p,n,G){var h=n.length-1;switch(p){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",n[h-1].id),l.addNode(n[h-2].length,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 16:l.getLogger().info("Node: ",n[h].id),l.addNode(n[h-1].length,n[h].id,n[h].descr,n[h].type);break;case 17:l.getLogger().trace("Icon: ",n[h]),l.decorateNode({icon:n[h]});break;case 18:case 23:l.decorateNode({class:n[h]});break;case 19:l.getLogger().trace("SPACELIST");break;case 20:l.getLogger().trace("Node: ",n[h-1].id),l.addNode(0,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 21:l.getLogger().trace("Node: ",n[h].id),l.addNode(0,n[h].id,n[h].descr,n[h].type);break;case 22:l.decorateNode({icon:n[h]});break;case 27:l.getLogger().trace("node found ..",n[h-2]),this.$={id:n[h-1],descr:n[h-1],type:l.getType(n[h-2],n[h])};break;case 28:this.$={id:n[h],descr:n[h],type:0};break;case 29:l.getLogger().trace("node found ..",n[h-3]),this.$={id:n[h-3],descr:n[h-1],type:l.getType(n[h-2],n[h])};break;case 30:this.$=n[h-1]+n[h];break;case 31:this.$=n[h];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:m,7:[1,10],9:9,12:11,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},t(A,[2,3]),{1:[2,2]},t(A,[2,4]),t(A,[2,5]),{1:[2,6],6:m,12:21,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:m,9:22,12:11,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:P,7:b,10:23,11:B},t(x,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:g}),t(x,[2,19]),t(x,[2,21],{15:30,24:X}),t(x,[2,22]),t(x,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:P,7:b,10:34,11:B},{1:[2,7],6:m,12:21,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},t(H,[2,14],{7:k,11:j}),t(T,[2,8]),t(T,[2,9]),t(T,[2,10]),t(x,[2,16],{15:37,24:X}),t(x,[2,17]),t(x,[2,18]),t(x,[2,20],{24:K}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(H,[2,13],{7:k,11:j}),t(T,[2,11]),t(T,[2,12]),t(x,[2,15],{24:K}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(a,i){if(i.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=i,c}},"parseError"),parse:e(function(a){var i=this,c=[0],l=[],p=[null],n=[],G=this.table,h="",J=0,he=0,ue=0,be=2,ge=1,ye=n.slice.call(arguments,1),_=Object.create(this.lexer),M={yy:{}};for(var te in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,te))M.yy[te]=this.yy[te];if(_.setInput(a,M.yy),M.yy.lexer=_,M.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var ne=_.yylloc;n.push(ne);var me=_.options&&_.options.ranges;if(typeof M.yy.parseError==="function")this.parseError=M.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(C){c.length=c.length-2*C,p.length=p.length-C,n.length=n.length-C}e(ke,"popStack");function de(){var C=l.pop()||_.lex()||ge;if(typeof C!=="number"){if(C instanceof Array)l=C,C=l.pop();C=i.symbols_[C]||C}return C}e(de,"lex");var v,ie,U,I,Fe,re,z={},Q,V,pe,Z;while(!0){if(U=c[c.length-1],this.defaultActions[U])I=this.defaultActions[U];else{if(v===null||typeof v>"u")v=de();I=G[U]&&G[U][v]}if(typeof I>"u"||!I.length||!I[0]){var se="";Z=[];for(Q in G[U])if(this.terminals_[Q]&&Q>be)Z.push("'"+this.terminals_[Q]+"'");if(_.showPosition)se="Parse error on line "+(J+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+Z.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else se="Parse error on line "+(J+1)+": Unexpected "+(v==ge?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(se,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:ne,expected:Z})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+U+", token: "+v);switch(I[0]){case 1:if(c.push(v),p.push(_.yytext),n.push(_.yylloc),c.push(I[1]),v=null,!ie){if(he=_.yyleng,h=_.yytext,J=_.yylineno,ne=_.yylloc,ue>0)ue--}else v=ie,ie=null;break;case 2:if(V=this.productions_[I[1]][1],z.$=p[p.length-V],z._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},me)z._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]];if(re=this.performAction.apply(z,[h,he,J,M.yy,I[1],p,n].concat(ye)),typeof re<"u")return re;if(V)c=c.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V);c.push(this.productions_[I[1]][0]),p.push(z.$),n.push(z._$),pe=G[c[c.length-2]][c[c.length-1]],c.push(pe);break;case 3:return!0}}return!0},"parse")},ee=function(){var R={EOF:1,parseError:e(function(i,c){if(this.yy.parser)this.yy.parser.parseError(i,c);else throw Error(i)},"parseError"),setInput:e(function(a,i){if(this.yy=i||this.yy||{},this._input=a,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];return this.offset=0,this},"setInput"),input:e(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var i=a.match(/(?:\r\n?|\n).*/g);if(i)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),a},"input"),unput:e(function(a){var i=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var l=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1)this.yylineno-=c.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-i},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-i];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(a){this.unput(this.match.slice(a))},"less"),pastInput:e(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var a=this.pastInput(),i=Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,Yt,r,se,y,C,S,E,T,A,I,L,s,p,N,Fe,Xr,le,ae,ie,ft,he,ge}from"./chunk-jtwhjp20.js";import{Pt}from"./chunk-ydgqrfvw.js";import{fe}from"./chunk-b5brnfv9.js";import{oe}from"./chunk-kbtbbarw.js";var Ue=function(){var i=e(function(q,l,h,f){for(h=h||{},f=q.length;f--;h[q[f]]=l);return h},"o"),c=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],b=[2,2],o=[1,7],u=[1,9],g=[1,10],R=[1,11],_=[1,12],v=[1,30],k=[1,23],m=[1,24],B=[1,25],W=[1,26],X=[1,27],D=[1,19],Y=[1,28],te=[1,29],G=[1,20],P=[1,18],z=[1,21],U=[1,22],Ke=[2,6],d=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Re=[1,36],ve=[1,37],De=[1,38],Le=[1,39],we=[1,40],re=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],ne=[1,57],ce=[43,51,53,54,55,74,75],ue=[1,70],de=[1,68],j=[1,65],be=[1,69],pe=[1,71],_e=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],me=[1,78],Ee=[1,77],Se=[1,76],Ze=[69,70,71,72,73],je=[1,91],qe=[6,9,45,50],J=[6,9,12,44,45,50,51,52],Te=[1,101],Ce=[1,100],Oe=[1,99],ke=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:e(function(l,h,f,n,O,t,ye){var a=t.length-1;switch(O){case 1:break;case 2:this.$=[];break;case 3:this.$=t[a-1].concat(t[a]);break;case 4:this.$=t[a];break;case 5:case 6:this.$=[];break;case 7:n.addEntity(t[a-4]),n.addEntity(t[a-2]),n.addRelationship(t[a-4],t[a],t[a-2],t[a-3]),this.$=[t[a-4],t[a-2]];break;case 8:n.addEntity(t[a-8]),n.addEntity(t[a-4]),n.addRelationship(t[a-8],t[a],t[a-4],t[a-5]),n.setClass([t[a-8]],t[a-6]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-8],t[a-4]];break;case 9:n.addEntity(t[a-6]),n.addEntity(t[a-2]),n.addRelationship(t[a-6],t[a],t[a-2],t[a-3]),n.setClass([t[a-6]],t[a-4]),this.$=[t[a-6],t[a-2]];break;case 10:n.addEntity(t[a-6]),n.addEntity(t[a-4]),n.addRelationship(t[a-6],t[a],t[a-4],t[a-5]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-6],t[a-4]];break;case 11:n.addEntity(t[a-3]),n.addAttributes(t[a-3],t[a-1]),this.$=[t[a-3]];break;case 12:n.addEntity(t[a-5]),n.addAttributes(t[a-5],t[a-1]),n.setClass([t[a-5]],t[a-3]),this.$=[t[a-5]];break;case 13:n.addEntity(t[a-2]),this.$=[t[a-2]];break;case 14:n.addEntity(t[a-4]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-4]];break;case 15:n.addEntity(t[a]),this.$=[t[a]];break;case 16:n.addEntity(t[a-2]),n.setClass([t[a-2]],t[a]),this.$=[t[a-2]];break;case 17:n.addEntity(t[a-6],t[a-4]),n.addAttributes(t[a-6],t[a-1]),this.$=[t[a-6]];break;case 18:n.addEntity(t[a-8],t[a-6]),n.addAttributes(t[a-8],t[a-1]),n.setClass([t[a-8]],t[a-3]),this.$=[t[a-8]];break;case 19:n.addEntity(t[a-5],t[a-3]),this.$=[t[a-5]];break;case 20:n.addEntity(t[a-7],t[a-5]),n.setClass([t[a-7]],t[a-2]),this.$=[t[a-7]];break;case 21:n.addEntity(t[a-3],t[a-1]);break;case 22:n.addEntity(t[a-5],t[a-3]),n.setClass([t[a-5]],t[a]);break;case 23:case 24:this.$=t[a].trim(),n.setAccTitle(this.$);break;case 25:case 26:this.$=t[a].trim(),n.setAccDescription(this.$);break;case 27:if(!n.subgraphDepth)n.setDirection(t[a].value),this.$=[];else this.$=t[a];break;case 31:n.subgraphDepth=(n.subgraphDepth||1)-1,this.$=n.addSubGraph({text:t[a-2].id},t[a-1],{text:t[a-2].text});break;case 32:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-1],text:t[a-1]};break;case 33:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-4],text:t[a-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[a];break;case 35:this.$=t[a-1]+" "+t[a];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[a-3],n.addClass(t[a-2],t[a-1]);break;case 41:case 42:case 63:case 72:this.$=[t[a]];break;case 43:case 44:this.$=t[a-2].concat([t[a]]);break;case 45:this.$=t[a-2],n.setClass(t[a-1],t[a]);break;case 46:this.$=t[a-3],n.addCssStyles(t[a-2],t[a-1]);break;case 47:this.$=[t[a]];break;case 48:t[a-2].push(t[a]),this.$=t[a-2];break;case 50:this.$=t[a-1]+t[a];break;case 58:case 84:case 85:this.$=t[a].replace(/"/g,"");break;case 64:t[a].push(t[a-1]),this.$=t[a];break;case 65:this.$={type:t[a-1],name:t[a]};break;case 66:this.$={type:t[a-2],name:t[a-1],keys:t[a]};break;case 67:this.$={type:t[a-2],name:t[a-1],comment:t[a]};break;case 68:this.$={type:t[a-3],name:t[a-2],keys:t[a-1],comment:t[a]};break;case 69:case 71:case 74:this.$=t[a];break;case 70:this.$=t[a-1]+t[a];break;case 73:t[a-2].push(t[a]),this.$=t[a-2];break;case 75:this.$=t[a].replace(/"/g,"");break;case 76:this.$={cardA:t[a],relType:t[a-1],cardB:t[a-2]};break;case 77:this.$=n.Cardinality.ZERO_OR_ONE;break;case 78:this.$=n.Cardinality.ZERO_OR_MORE;break;case 79:this.$=n.Cardinality.ONE_OR_MORE;break;case 80:this.$=n.Cardinality.ONLY_ONE;break;case 81:this.$=n.Cardinality.MD_PARENT;break;case 82:this.$=n.Identification.NON_IDENTIFYING;break;case 83:this.$=n.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(c,b,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},i(c,Ke,{1:[2,1]}),i(d,[2,3]),i(d,[2,4]),i(d,[2,5]),i(d,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Re,70:ve,71:De,72:Le,73:we}),{22:[1,41]},{24:[1,42]},{26:[1,43]},i(d,[2,26]),i(d,[2,27]),i(d,[2,28]),i(d,[2,29]),i(d,[2,30]),i(d,b,{5:44}),i(re,[2,58]),i(re,[2,59]),i(re,[2,60]),i(re,[2,61]),i(re,[2,62]),i(d,[2,36]),i(d,[2,37]),i(d,[2,38]),i(d,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:D,51:G,53:P,54:z,55:U},{10:51,43:D,51:G,53:P,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:ne},{10:58,43:D,51:G,53:P,54:z,55:U},{68:59,74:[1,60],75:[1,61]},i(ce,[2,77]),i(ce,[2,78]),i(ce,[2,79]),i(ce,[2,80]),i(ce,[2,81]),i(d,[2,23]),i(d,[2,24]),i(d,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},{12:ue,42:64,44:de,45:j,48:66,49:67,51:be,52:pe},i(_e,[2,41]),i(_e,[2,42]),{15:72,43:K,44:Z,45:j},{12:ue,42:73,44:de,45:j,48:66,49:67,51:be,52:pe},{6:me,9:Ee,19:[1,75],35:74,50:Se},{12:[1,79],14:[1,80]},i(d,[2,16],{67:35,11:81,16:[1,82],45:j,69:Re,70:ve,71:De,72:Le,73:we}),{18:[1,83]},i(d,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ne},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Re,70:ve,71:De,72:Le,73:we},i(Ze,[2,82]),i(Ze,[2,83]),i(d,[2,31]),i(d,Ke),{6:me,9:Ee,35:90,45:je,50:Se},{43:[1,92],44:[1,93]},i(qe,[2,47],{49:94,12:ue,44:de,51:be,52:pe}),i(J,[2,49]),i(J,[2,54]),i(J,[2,55]),i(J,[2,56]),i(J,[2,57]),i(d,[2,45],{45:j}),{6:me,9:Ee,35:95,45:je,50:Se},i(d,[2,32]),{10:97,36:96,43:D,51:G,53:P,54:z,55:U},i(d,[2,51]),i(d,[2,52]),i(d,[2,53]),{13:98,43:Te,53:Ce,76:Oe},{15:102,43:K,44:Z},{10:103,43:D,51:G,53:P,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:ne},i(d,[2,11]),{18:[2,64]},i(ke,[2,65],{59:106,60:107,63:108,65:We,66:He}),i([18,61,65,66],[2,71]),{61:[2,70]},i(d,[2,21],{14:[1,112],16:[1,111]}),i([43,51,53,54,55],[2,76]),i(d,[2,40]),{12:ue,44:de,48:113,49:67,51:be,52:pe},i(_e,[2,43]),i(_e,[2,44]),i(J,[2,50]),i(d,[2,46]),{10:115,20:[1,114],43:D,51:G,53:P,54:z,55:U},i(Qe,[2,34]),i(d,[2,7]),i(d,[2,84]),i(d,[2,85]),i(d,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},i(d,[2,14]),i(ke,[2,66],{60:120,64:[1,121],66:He}),i(ke,[2,67]),i(Ve,[2,72]),i(ke,[2,75]),i(Ve,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ne},{15:124,43:K,44:Z},i(qe,[2,48],{49:94,12:ue,44:de,51:be,52:pe}),{6:me,9:Ee,35:125,50:Se},i(Qe,[2,35]),{13:126,43:Te,53:Ce,76:Oe},{15:127,43:K,44:Z},{13:128,43:Te,53:Ce,76:Oe},i(d,[2,12]),i(ke,[2,68]),{63:129,65:We},{18:[1,130]},i(d,[2,19]),i(d,[2,22],{16:[1,131],45:j}),i(d,[2,33]),i(d,[2,10]),{12:[1,132],45:j},i(d,[2,9]),i(Ve,[2,73]),i(d,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ne},{13:135,43:Te,53:Ce,76:Oe},{18:[1,136]},i(d,[2,20]),i(d,[2,8]),i(d,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(l,h){if(h.recoverable)this.trace(l);else{var f=Error(l);throw f.hash=h,f}},"parseError"),parse:e(function(l){var h=this,f=[0],n=[],O=[null],t=[],ye=this.table,a="",xe=0,Xe=0,Je=0,at=2,$e=1,nt=t.slice.call(arguments,1),x=Object.create(this.lexer),H={yy:{}};for(var Be in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Be))H.yy[Be]=this.yy[Be];if(x.setInput(l,H.yy),H.yy.lexer=x,H.yy.parser=this,typeof x.yylloc>"u")x.yylloc={};var Ge=x.yylloc;t.push(Ge);var ot=x.options&&x.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lt(M){f.length=f.length-2*M,O.length=O.length-M,t.length=t.length-M}e(lt,"popStack");function et(){var M=n.pop()||x.lex()||$e;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=h.symbols_[M]||M}return M}e(et,"lex");var w,Ye,Q,V,kt,Pe,ee={},Ae,F,tt,Ie;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])V=this.defaultActions[Q];else{if(w===null||typeof w>"u")w=et();V=ye[Q]&&ye[Q][w]}if(typeof V>"u"||!V.length||!V[0]){var ze="";Ie=[];for(Ae in ye[Q])if(this.terminals_[Ae]&&Ae>at)Ie.push("'"+this.terminals_[Ae]+"'");if(x.showPosition)ze="Parse error on line "+(xe+1)+`:
|
|
1
|
+
import{e,Yt,r,se,y,C,S,E,T,A,I,L,s,p,N,Fe,Xr,le,ae,ie,ft,he,ge}from"./chunk-y0m8hrwz.js";import{Pt}from"./chunk-37ajk6zg.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var Ue=function(){var i=e(function(q,l,h,f){for(h=h||{},f=q.length;f--;h[q[f]]=l);return h},"o"),c=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],b=[2,2],o=[1,7],u=[1,9],g=[1,10],R=[1,11],_=[1,12],v=[1,30],k=[1,23],m=[1,24],B=[1,25],W=[1,26],X=[1,27],D=[1,19],Y=[1,28],te=[1,29],G=[1,20],P=[1,18],z=[1,21],U=[1,22],Ke=[2,6],d=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Re=[1,36],ve=[1,37],De=[1,38],Le=[1,39],we=[1,40],re=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],ne=[1,57],ce=[43,51,53,54,55,74,75],ue=[1,70],de=[1,68],j=[1,65],be=[1,69],pe=[1,71],_e=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],me=[1,78],Ee=[1,77],Se=[1,76],Ze=[69,70,71,72,73],je=[1,91],qe=[6,9,45,50],J=[6,9,12,44,45,50,51,52],Te=[1,101],Ce=[1,100],Oe=[1,99],ke=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:e(function(l,h,f,n,O,t,ye){var a=t.length-1;switch(O){case 1:break;case 2:this.$=[];break;case 3:this.$=t[a-1].concat(t[a]);break;case 4:this.$=t[a];break;case 5:case 6:this.$=[];break;case 7:n.addEntity(t[a-4]),n.addEntity(t[a-2]),n.addRelationship(t[a-4],t[a],t[a-2],t[a-3]),this.$=[t[a-4],t[a-2]];break;case 8:n.addEntity(t[a-8]),n.addEntity(t[a-4]),n.addRelationship(t[a-8],t[a],t[a-4],t[a-5]),n.setClass([t[a-8]],t[a-6]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-8],t[a-4]];break;case 9:n.addEntity(t[a-6]),n.addEntity(t[a-2]),n.addRelationship(t[a-6],t[a],t[a-2],t[a-3]),n.setClass([t[a-6]],t[a-4]),this.$=[t[a-6],t[a-2]];break;case 10:n.addEntity(t[a-6]),n.addEntity(t[a-4]),n.addRelationship(t[a-6],t[a],t[a-4],t[a-5]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-6],t[a-4]];break;case 11:n.addEntity(t[a-3]),n.addAttributes(t[a-3],t[a-1]),this.$=[t[a-3]];break;case 12:n.addEntity(t[a-5]),n.addAttributes(t[a-5],t[a-1]),n.setClass([t[a-5]],t[a-3]),this.$=[t[a-5]];break;case 13:n.addEntity(t[a-2]),this.$=[t[a-2]];break;case 14:n.addEntity(t[a-4]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-4]];break;case 15:n.addEntity(t[a]),this.$=[t[a]];break;case 16:n.addEntity(t[a-2]),n.setClass([t[a-2]],t[a]),this.$=[t[a-2]];break;case 17:n.addEntity(t[a-6],t[a-4]),n.addAttributes(t[a-6],t[a-1]),this.$=[t[a-6]];break;case 18:n.addEntity(t[a-8],t[a-6]),n.addAttributes(t[a-8],t[a-1]),n.setClass([t[a-8]],t[a-3]),this.$=[t[a-8]];break;case 19:n.addEntity(t[a-5],t[a-3]),this.$=[t[a-5]];break;case 20:n.addEntity(t[a-7],t[a-5]),n.setClass([t[a-7]],t[a-2]),this.$=[t[a-7]];break;case 21:n.addEntity(t[a-3],t[a-1]);break;case 22:n.addEntity(t[a-5],t[a-3]),n.setClass([t[a-5]],t[a]);break;case 23:case 24:this.$=t[a].trim(),n.setAccTitle(this.$);break;case 25:case 26:this.$=t[a].trim(),n.setAccDescription(this.$);break;case 27:if(!n.subgraphDepth)n.setDirection(t[a].value),this.$=[];else this.$=t[a];break;case 31:n.subgraphDepth=(n.subgraphDepth||1)-1,this.$=n.addSubGraph({text:t[a-2].id},t[a-1],{text:t[a-2].text});break;case 32:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-1],text:t[a-1]};break;case 33:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-4],text:t[a-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[a];break;case 35:this.$=t[a-1]+" "+t[a];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[a-3],n.addClass(t[a-2],t[a-1]);break;case 41:case 42:case 63:case 72:this.$=[t[a]];break;case 43:case 44:this.$=t[a-2].concat([t[a]]);break;case 45:this.$=t[a-2],n.setClass(t[a-1],t[a]);break;case 46:this.$=t[a-3],n.addCssStyles(t[a-2],t[a-1]);break;case 47:this.$=[t[a]];break;case 48:t[a-2].push(t[a]),this.$=t[a-2];break;case 50:this.$=t[a-1]+t[a];break;case 58:case 84:case 85:this.$=t[a].replace(/"/g,"");break;case 64:t[a].push(t[a-1]),this.$=t[a];break;case 65:this.$={type:t[a-1],name:t[a]};break;case 66:this.$={type:t[a-2],name:t[a-1],keys:t[a]};break;case 67:this.$={type:t[a-2],name:t[a-1],comment:t[a]};break;case 68:this.$={type:t[a-3],name:t[a-2],keys:t[a-1],comment:t[a]};break;case 69:case 71:case 74:this.$=t[a];break;case 70:this.$=t[a-1]+t[a];break;case 73:t[a-2].push(t[a]),this.$=t[a-2];break;case 75:this.$=t[a].replace(/"/g,"");break;case 76:this.$={cardA:t[a],relType:t[a-1],cardB:t[a-2]};break;case 77:this.$=n.Cardinality.ZERO_OR_ONE;break;case 78:this.$=n.Cardinality.ZERO_OR_MORE;break;case 79:this.$=n.Cardinality.ONE_OR_MORE;break;case 80:this.$=n.Cardinality.ONLY_ONE;break;case 81:this.$=n.Cardinality.MD_PARENT;break;case 82:this.$=n.Identification.NON_IDENTIFYING;break;case 83:this.$=n.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(c,b,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},i(c,Ke,{1:[2,1]}),i(d,[2,3]),i(d,[2,4]),i(d,[2,5]),i(d,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Re,70:ve,71:De,72:Le,73:we}),{22:[1,41]},{24:[1,42]},{26:[1,43]},i(d,[2,26]),i(d,[2,27]),i(d,[2,28]),i(d,[2,29]),i(d,[2,30]),i(d,b,{5:44}),i(re,[2,58]),i(re,[2,59]),i(re,[2,60]),i(re,[2,61]),i(re,[2,62]),i(d,[2,36]),i(d,[2,37]),i(d,[2,38]),i(d,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:D,51:G,53:P,54:z,55:U},{10:51,43:D,51:G,53:P,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:ne},{10:58,43:D,51:G,53:P,54:z,55:U},{68:59,74:[1,60],75:[1,61]},i(ce,[2,77]),i(ce,[2,78]),i(ce,[2,79]),i(ce,[2,80]),i(ce,[2,81]),i(d,[2,23]),i(d,[2,24]),i(d,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},{12:ue,42:64,44:de,45:j,48:66,49:67,51:be,52:pe},i(_e,[2,41]),i(_e,[2,42]),{15:72,43:K,44:Z,45:j},{12:ue,42:73,44:de,45:j,48:66,49:67,51:be,52:pe},{6:me,9:Ee,19:[1,75],35:74,50:Se},{12:[1,79],14:[1,80]},i(d,[2,16],{67:35,11:81,16:[1,82],45:j,69:Re,70:ve,71:De,72:Le,73:we}),{18:[1,83]},i(d,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ne},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Re,70:ve,71:De,72:Le,73:we},i(Ze,[2,82]),i(Ze,[2,83]),i(d,[2,31]),i(d,Ke),{6:me,9:Ee,35:90,45:je,50:Se},{43:[1,92],44:[1,93]},i(qe,[2,47],{49:94,12:ue,44:de,51:be,52:pe}),i(J,[2,49]),i(J,[2,54]),i(J,[2,55]),i(J,[2,56]),i(J,[2,57]),i(d,[2,45],{45:j}),{6:me,9:Ee,35:95,45:je,50:Se},i(d,[2,32]),{10:97,36:96,43:D,51:G,53:P,54:z,55:U},i(d,[2,51]),i(d,[2,52]),i(d,[2,53]),{13:98,43:Te,53:Ce,76:Oe},{15:102,43:K,44:Z},{10:103,43:D,51:G,53:P,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:ne},i(d,[2,11]),{18:[2,64]},i(ke,[2,65],{59:106,60:107,63:108,65:We,66:He}),i([18,61,65,66],[2,71]),{61:[2,70]},i(d,[2,21],{14:[1,112],16:[1,111]}),i([43,51,53,54,55],[2,76]),i(d,[2,40]),{12:ue,44:de,48:113,49:67,51:be,52:pe},i(_e,[2,43]),i(_e,[2,44]),i(J,[2,50]),i(d,[2,46]),{10:115,20:[1,114],43:D,51:G,53:P,54:z,55:U},i(Qe,[2,34]),i(d,[2,7]),i(d,[2,84]),i(d,[2,85]),i(d,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},i(d,[2,14]),i(ke,[2,66],{60:120,64:[1,121],66:He}),i(ke,[2,67]),i(Ve,[2,72]),i(ke,[2,75]),i(Ve,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ne},{15:124,43:K,44:Z},i(qe,[2,48],{49:94,12:ue,44:de,51:be,52:pe}),{6:me,9:Ee,35:125,50:Se},i(Qe,[2,35]),{13:126,43:Te,53:Ce,76:Oe},{15:127,43:K,44:Z},{13:128,43:Te,53:Ce,76:Oe},i(d,[2,12]),i(ke,[2,68]),{63:129,65:We},{18:[1,130]},i(d,[2,19]),i(d,[2,22],{16:[1,131],45:j}),i(d,[2,33]),i(d,[2,10]),{12:[1,132],45:j},i(d,[2,9]),i(Ve,[2,73]),i(d,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ne},{13:135,43:Te,53:Ce,76:Oe},{18:[1,136]},i(d,[2,20]),i(d,[2,8]),i(d,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(l,h){if(h.recoverable)this.trace(l);else{var f=Error(l);throw f.hash=h,f}},"parseError"),parse:e(function(l){var h=this,f=[0],n=[],O=[null],t=[],ye=this.table,a="",xe=0,Xe=0,Je=0,at=2,$e=1,nt=t.slice.call(arguments,1),x=Object.create(this.lexer),H={yy:{}};for(var Be in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Be))H.yy[Be]=this.yy[Be];if(x.setInput(l,H.yy),H.yy.lexer=x,H.yy.parser=this,typeof x.yylloc>"u")x.yylloc={};var Ge=x.yylloc;t.push(Ge);var ot=x.options&&x.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lt(M){f.length=f.length-2*M,O.length=O.length-M,t.length=t.length-M}e(lt,"popStack");function et(){var M=n.pop()||x.lex()||$e;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=h.symbols_[M]||M}return M}e(et,"lex");var w,Ye,Q,V,kt,Pe,ee={},Ae,F,tt,Ie;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])V=this.defaultActions[Q];else{if(w===null||typeof w>"u")w=et();V=ye[Q]&&ye[Q][w]}if(typeof V>"u"||!V.length||!V[0]){var ze="";Ie=[];for(Ae in ye[Q])if(this.terminals_[Ae]&&Ae>at)Ie.push("'"+this.terminals_[Ae]+"'");if(x.showPosition)ze="Parse error on line "+(xe+1)+`:
|
|
2
2
|
`+x.showPosition()+`
|
|
3
3
|
Expecting `+Ie.join(", ")+", got '"+(this.terminals_[w]||w)+"'";else ze="Parse error on line "+(xe+1)+": Unexpected "+(w==$e?"end of input":"'"+(this.terminals_[w]||w)+"'");this.parseError(ze,{text:x.match,token:this.terminals_[w]||w,line:x.yylineno,loc:Ge,expected:Ie})}if(V[0]instanceof Array&&V.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+w);switch(V[0]){case 1:if(f.push(w),O.push(x.yytext),t.push(x.yylloc),f.push(V[1]),w=null,!Ye){if(Xe=x.yyleng,a=x.yytext,xe=x.yylineno,Ge=x.yylloc,Je>0)Je--}else w=Ye,Ye=null;break;case 2:if(F=this.productions_[V[1]][1],ee.$=O[O.length-F],ee._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ot)ee._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]];if(Pe=this.performAction.apply(ee,[a,Xe,xe,H.yy,V[1],O,t].concat(nt)),typeof Pe<"u")return Pe;if(F)f=f.slice(0,-1*F*2),O=O.slice(0,-1*F),t=t.slice(0,-1*F);f.push(this.productions_[V[1]][0]),O.push(ee.$),t.push(ee._$),tt=ye[f[f.length-2]][f[f.length-1]],f.push(tt);break;case 3:return!0}}return!0},"parse")},rt=function(){var q={EOF:1,parseError:e(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw Error(h)},"parseError"),setInput:e(function(l,h){if(this.yy=h||this.yy||{},this._input=l,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];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var h=l.match(/(?:\r\n?|\n).*/g);if(h)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var h=l.length,f=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1)this.yylineno-=f.length-1;var O=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===n.length?this.yylloc.first_column:0)+n[n.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges)this.yylloc.range=[O[0],O[0]+this.yyleng-h];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),h=Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h,o,i,a,t,n,_,Z,te,rt,vt}from"./chunk-
|
|
1
|
+
import{h,o,i,a,t,n,_,Z,te,rt,vt}from"./chunk-vt40e1kp.js";import{gn}from"./chunk-f26smjjf.js";var I={config:"自定义路径",env:"环境变量",system:"系统预装"};function L({connection:p,onClose:S}){let{Button:m,Input:O,Switch:C,SettingGroup:N,SettingRow:v,cn:w}=_(),[b,B]=a({}),[r,g]=a({}),[l,y]=a(null),[u,A]=a(!0),[k,z]=a(!1),[d,R]=a(!1),[f,c]=a(null),P=i(null),q=(r.executable??"")!==(b.executable??"")||Boolean(r.noSandbox)!==Boolean(b.noSandbox)||Boolean(r.ignoreCertErrors)!==Boolean(b.ignoreCertErrors),E=h(async(e)=>{z(!0);try{let s=await p.request("/api/plugins/browser/status",{signal:e});y(s)}catch(s){if(!e?.aborted)y({available:!1,error:s instanceof Error?s.message:"无法获取浏览器状态"})}finally{if(!e?.aborted)z(!1)}},[p]);o(()=>{let e=new AbortController;return P.current=e,Promise.all([p.request("/api/plugins/browser/settings",{signal:e.signal}),p.request("/api/plugins/browser/status",{signal:e.signal})]).then(([s,x])=>{if(!e.signal.aborted)B(s),g(s),y(x)}).catch((s)=>{if(!e.signal.aborted)c({type:"error",text:s instanceof Error?s.message:"读取浏览器设置失败"})}).finally(()=>{if(!e.signal.aborted)A(!1)}),()=>e.abort()},[p]);let T=async(e)=>{if(e?.preventDefault(),d||u)return;let s=new AbortController;R(!0),c(null);try{if(await p.request("/api/plugins/browser/settings",{method:"PATCH",signal:s.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),!s.signal.aborted)B(r),c({type:"success",text:"设置已保存,将在浏览器进程下次启动时生效。"}),await E(s.signal)}catch(x){if(!s.signal.aborted)c({type:"error",text:x instanceof Error?x.message:"保存设置失败"})}finally{if(!s.signal.aborted)R(!1)}},G=()=>{g(b),c(null)};return n("div",{className:"min-w-0 space-y-6",children:[t(N,{title:"运行环境",action:n(m,{size:"sm",variant:"ghost",disabled:u||k,onClick:()=>void E(),className:"h-8 px-2.5 text-xs text-dim hover:text-ink",children:[t(te,{className:w("mr-1.5 size-3.5",k&&"animate-spin")}),"重新检测"]}),children:t("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-2",children:[t("span",{className:w("size-2 shrink-0 rounded-full",l?.available?"bg-success shadow-[0_0_8px_var(--color-success)]":"bg-danger")}),t("span",{className:"text-sm font-medium text-ink",children:l?l.available?"浏览器可用":"未检测到可用浏览器":"正在检测…"}),l?.available&&l.source&&t("span",{className:"rounded-md bg-raised px-2 py-0.5 text-xs text-dim",children:I[l.source]??l.source})]}),l&&!l.available&&l.error&&t("p",{className:"mt-2 text-xs leading-5 text-danger",children:l.error})]})})}),n("form",{onSubmit:T,children:[n(N,{title:"启动参数",children:[t(v,{vertical:!0,title:"可执行文件路径",children:n("div",{className:"flex gap-2",children:[t(O,{id:"browser-executable",disabled:u||d,value:r.executable??"",placeholder:"留空自动探测系统浏览器",onChange:(e)=>{g({...r,executable:e.target.value}),c(null)}}),r.executable&&t(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:()=>{g({...r,executable:""}),c(null)},className:"shrink-0",children:"清空"})]})}),t(v,{title:"禁用沙箱 (--no-sandbox)",description:"容器或 root 环境使用",children:t(C,{label:"禁用沙箱",disabled:u||d,checked:r.noSandbox??!1,onCheckedChange:(e)=>{g({...r,noSandbox:e}),c(null)}})}),t(v,{title:"忽略证书错误 (--ignore-certificate-errors)",description:"跳过自签名与证书有效性检查",children:t(C,{label:"忽略证书错误",disabled:u||d,checked:r.ignoreCertErrors??!1,onCheckedChange:(e)=>{g({...r,ignoreCertErrors:e}),c(null)}})})]}),n("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3 px-0.5",children:[t("div",{className:"min-w-0 flex-1",children:f&&n("div",{className:w("flex items-center gap-2 text-xs",f.type==="success"?"text-success":"text-danger"),children:[f.type==="success"?t(gn,{className:"size-3.5 shrink-0"}):t(Z,{className:"size-3.5 shrink-0"}),t("span",{children:f.text})]})}),n("div",{className:"flex items-center gap-2",children:[q&&n(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:G,children:[t(rt,{className:"mr-1.5 size-3.5"}),"重置"]}),n(m,{type:"submit",variant:"primary",size:"sm",disabled:u||d,children:[t(vt,{className:"mr-1.5 size-3.5"}),d?"保存中…":"保存"]}),S&&t(m,{type:"button",variant:"secondary",size:"sm",onClick:S,children:"关闭"})]})]})]})]})}export{L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,r,D,b,O,C,S,E,T,A,I,L,s,p,N,ti,le,ae,ie,ft,he,ge}from"./chunk-
|
|
1
|
+
import{e,r,D,b,O,C,S,E,T,A,I,L,s,p,N,ti,le,ae,ie,ft,he,ge}from"./chunk-y0m8hrwz.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";function tt(t){if(console&&console.error)console.error(`Error: ${t}`)}function gt(t){if(console&&console.warn)console.warn(`Warning: ${t}`)}function At(t){let n=new Date().getTime(),i=t();return{time:new Date().getTime()-n,value:i}}function St(t){function n(){}n.prototype=t;let i=new n;function a(){return typeof i.bar}return a(),a(),t;(0,eval)(t)}function Gr(t){if(Wr(t))return t.LABEL;else return t.name}function Wr(t){return typeof t.LABEL==="string"&&t.LABEL!==""}class Ne{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),this.definition.forEach((n)=>{n.accept(t)})}}class W extends Ne{constructor(t){super([]);this.idx=1,Object.assign(this,xe(t))}set definition(t){}get definition(){if(this.referencedRule!==void 0)return this.referencedRule.definition;return[]}accept(t){t.visit(this)}}class Ae extends Ne{constructor(t){super(t.definition);this.orgText="",Object.assign(this,xe(t))}}class j extends Ne{constructor(t){super(t.definition);this.ignoreAmbiguities=!1,Object.assign(this,xe(t))}}class K extends Ne{constructor(t){super(t.definition);this.idx=1,Object.assign(this,xe(t))}}class Z extends Ne{constructor(t){super(t.definition);this.idx=1,Object.assign(this,xe(t))}}class Q extends Ne{constructor(t){super(t.definition);this.idx=1,Object.assign(this,xe(t))}}class G extends Ne{constructor(t){super(t.definition);this.idx=1,Object.assign(this,xe(t))}}class q extends Ne{constructor(t){super(t.definition);this.idx=1,Object.assign(this,xe(t))}}class J extends Ne{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition);this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,xe(t))}}class F{constructor(t){this.idx=1,Object.assign(this,xe(t))}accept(t){t.visit(this)}}function Wt(t){return t.map(st)}function st(t){function n(i){return i.map(st)}if(t instanceof W){let i={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(typeof t.label==="string")i.label=t.label;return i}else if(t instanceof j)return{type:"Alternative",definition:n(t.definition)};else if(t instanceof K)return{type:"Option",idx:t.idx,definition:n(t.definition)};else if(t instanceof Z)return{type:"RepetitionMandatory",idx:t.idx,definition:n(t.definition)};else if(t instanceof Q)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:st(new F({terminalType:t.separator})),definition:n(t.definition)};else if(t instanceof q)return{type:"RepetitionWithSeparator",idx:t.idx,separator:st(new F({terminalType:t.separator})),definition:n(t.definition)};else if(t instanceof G)return{type:"Repetition",idx:t.idx,definition:n(t.definition)};else if(t instanceof J)return{type:"Alternation",idx:t.idx,definition:n(t.definition)};else if(t instanceof F){let i={type:"Terminal",name:t.terminalType.name,label:Gr(t.terminalType),idx:t.idx};if(typeof t.label==="string")i.terminalLabel=t.label;let a=t.terminalType.PATTERN;if(t.terminalType.PATTERN)i.pattern=a instanceof RegExp?a.source:a;return i}else if(t instanceof Ae)return{type:"Rule",name:t.name,orgText:t.orgText,definition:n(t.definition)};else throw Error("non exhaustive match")}function xe(t){return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}class Se{visit(t){let n=t;switch(n.constructor){case W:return this.visitNonTerminal(n);case j:return this.visitAlternative(n);case K:return this.visitOption(n);case Z:return this.visitRepetitionMandatory(n);case Q:return this.visitRepetitionMandatoryWithSeparator(n);case q:return this.visitRepetitionWithSeparator(n);case G:return this.visitRepetition(n);case J:return this.visitAlternation(n);case F:return this.visitTerminal(n);case Ae:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}function vs(t){return t instanceof j||t instanceof K||t instanceof G||t instanceof Z||t instanceof Q||t instanceof q||t instanceof F||t instanceof Ae}function je(t,n=[]){if(t instanceof K||t instanceof G||t instanceof q)return!0;if(t instanceof J)return t.definition.some((a)=>je(a,n));else if(t instanceof W&&n.includes(t))return!1;else if(t instanceof Ne){if(t instanceof W)n.push(t);return t.definition.every((a)=>je(a,n))}else return!1}function Ms(t){return t instanceof J}function Re(t){if(t instanceof W)return"SUBRULE";else if(t instanceof K)return"OPTION";else if(t instanceof J)return"OR";else if(t instanceof Z)return"AT_LEAST_ONE";else if(t instanceof Q)return"AT_LEAST_ONE_SEP";else if(t instanceof q)return"MANY_SEP";else if(t instanceof G)return"MANY";else if(t instanceof F)return"CONSUME";else throw Error("non exhaustive match")}class $e{walk(t,n=[]){t.definition.forEach((i,a)=>{let o=t.definition.slice(a+1);if(i instanceof W)this.walkProdRef(i,o,n);else if(i instanceof F)this.walkTerminal(i,o,n);else if(i instanceof j)this.walkFlat(i,o,n);else if(i instanceof K)this.walkOption(i,o,n);else if(i instanceof Z)this.walkAtLeastOne(i,o,n);else if(i instanceof Q)this.walkAtLeastOneSep(i,o,n);else if(i instanceof q)this.walkManySep(i,o,n);else if(i instanceof G)this.walkMany(i,o,n);else if(i instanceof J)this.walkOr(i,o,n);else throw Error("non exhaustive match")})}walkTerminal(t,n,i){}walkProdRef(t,n,i){}walkFlat(t,n,i){let a=n.concat(i);this.walk(t,a)}walkOption(t,n,i){let a=n.concat(i);this.walk(t,a)}walkAtLeastOne(t,n,i){let a=[new K({definition:t.definition})].concat(n,i);this.walk(t,a)}walkAtLeastOneSep(t,n,i){let a=Nn(t,n,i);this.walk(t,a)}walkMany(t,n,i){let a=[new K({definition:t.definition})].concat(n,i);this.walk(t,a)}walkManySep(t,n,i){let a=Nn(t,n,i);this.walk(t,a)}walkOr(t,n,i){let a=n.concat(i);t.definition.forEach((o)=>{let l=new j({definition:[o]});this.walk(l,a)})}}function Nn(t,n,i){return[new K({definition:[new F({terminalType:t.separator})].concat(t.definition)})].concat(n,i)}function Ke(t){if(t instanceof W)return Ke(t.referencedRule);else if(t instanceof F)return Vr(t);else if(vs(t))return jr(t);else if(Ms(t))return Kr(t);else throw Error("non exhaustive match")}function jr(t){let n=[],i=t.definition,a=0,o=i.length>a,l,h=!0;while(o&&h)l=i[a],h=je(l),n=n.concat(Ke(l)),a=a+1,o=i.length>a;return[...new Set(n)]}function Kr(t){let n=t.definition.map((i)=>Ke(i));return[...new Set(n.flat())]}function Vr(t){return[t.terminalType]}var jt="_~IN~_";class In extends $e{constructor(t){super();this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,n,i){}walkProdRef(t,n,i){let a=zr(t.referencedRule,t.idx)+this.topProd.name,o=n.concat(i),l=new j({definition:o}),h=Ke(l);this.follows[a]=h}}function kn(t){let n={};return t.forEach((i)=>{let a=new In(i).startWalking();Object.assign(n,a)}),n}function zr(t,n){return t.name+n+jt}function v(t){return t.charCodeAt(0)}function Kt(t,n){if(Array.isArray(t))t.forEach(function(i){n.push(i)});else n.push(t)}function nt(t,n){if(t[n]===!0)throw"duplicate flag "+n;let i=t[n];t[n]=!0}function Ve(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Rt(){throw Error("Internal Error - Should never get here!")}function ws(t){return t.type==="Character"}var yt=[];for(let t=v("0");t<=v("9");t++)yt.push(t);var Ot=[v("_")].concat(yt);for(let t=v("a");t<=v("z");t++)Ot.push(t);for(let t=v("A");t<=v("Z");t++)Ot.push(t);var Us=[v(" "),v("\f"),v(`
|
|
2
2
|
`),v("\r"),v("\t"),v("\v"),v("\t"),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v(" "),v("\u2028"),v("\u2029"),v(" "),v(" "),v(" "),v("\uFEFF")];var Hr=/[0-9a-fA-F]/,Vt=/[0-9]/,Xr=/[1-9]/;class zt{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let n=this.disjunction();this.consumeChar("/");let i={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":nt(i,"global");break;case"i":nt(i,"ignoreCase");break;case"m":nt(i,"multiLine");break;case"u":nt(i,"unicode");break;case"y":nt(i,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:i,value:n,loc:this.loc(0)}}disjunction(){let t=[],n=this.idx;t.push(this.alternative());while(this.peekChar()==="|")this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(n)}}alternative(){let t=[],n=this.idx;while(this.isTerm())t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(n)}}term(){if(this.isAssertion())return this.assertion();else return this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}Ve(n);let i=this.disjunction();return this.consumeChar(")"),{type:n,value:i,loc:this.loc(t)}}return Rt()}quantifier(t=!1){let n=void 0,i=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":let a=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:a,atMost:a};break;case",":let o;if(this.isDigit())o=this.integerIncludingZero(),n={atLeast:a,atMost:o};else n={atLeast:a,atMost:1/0};this.consumeChar("}");break}if(t===!0&&n===void 0)return;Ve(n);break}if(t===!0&&n===void 0)return;if(Ve(n)){if(this.peekChar(0)==="?")this.consumeChar("?"),n.greedy=!1;else n.greedy=!0;return n.type="Quantifier",n.loc=this.loc(i),n}}atom(){let t,n=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}if(t===void 0&&this.isPatternCharacter())t=this.patternCharacter();if(Ve(t)){if(t.loc=this.loc(n),this.isQuantifier())t.quantifier=this.quantifier();return t}return Rt()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[v(`
|
|
3
3
|
`),v("\r"),v("\u2028"),v("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,n=!1;switch(this.popChar()){case"d":t=yt;break;case"D":t=yt,n=!0;break;case"s":t=Us;break;case"S":t=Us,n=!0;break;case"w":t=Ot;break;case"W":t=Ot,n=!0;break}if(Ve(t))return{type:"Set",value:t,complement:n};return Rt()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=v("\f");break;case"n":t=v(`
|
|
4
4
|
`);break;case"r":t=v("\r");break;case"t":t=v("\t");break;case"v":t=v("\v");break}if(Ve(t))return{type:"Character",value:t};return Rt()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:v("\x00")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:v(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{e}from"./chunk-y0m8hrwz.js";import"./chunk-p3b9crsa.js";import{Ei,Ai}from"./chunk-a3verqw9.js";import"./chunk-2m12wyrb.js";import"./chunk-37ajk6zg.js";import"./chunk-ss1bcb0n.js";import"./chunk-hev4hq89.js";var r=e((t)=>`${Ei(t)}
|
|
2
|
+
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
+
stroke: ${t.clusterBorder} !important;
|
|
4
|
+
}
|
|
5
|
+
[data-look="neo"].cluster rect {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
`,"getStyles"),o=r,D=Ai({styles:o});export{D as diagram};
|