@bkm016/basalt 0.1.7 → 0.1.9
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/README.md +1 -1
- package/{chunk-0039s4jt.js → chunk-02d3x4mj.js} +3 -3
- package/{chunk-sjjtxpg2.js → chunk-0xd9mnc2.js} +394 -341
- package/{chunk-npez1492.js → chunk-13gvs0ax.js} +2 -2
- package/{chunk-n981vx1t.js → chunk-1n7dat03.js} +6 -6
- package/{chunk-6ptv4g5e.js → chunk-1zj3zvw5.js} +3 -3
- package/{chunk-zxkq9m8e.js → chunk-29qrxygd.js} +2 -2
- package/{chunk-y8dkfpmj.js → chunk-30rjf7my.js} +4 -4
- package/{chunk-39vwrg8n.js → chunk-38g3gctw.js} +2 -2
- package/{chunk-benrzwea.js → chunk-4dw43syb.js} +1 -1
- package/{chunk-w67dvqtb.js → chunk-4gtgqcct.js} +2 -2
- package/chunk-66h5qpc6.js +479 -0
- package/{chunk-8wj32837.js → chunk-755sy11p.js} +1 -1
- package/chunk-7zkswxvk.js +2 -0
- package/{chunk-ebpyvs1d.js → chunk-82v8jh1h.js} +2 -2
- package/chunk-95964592.js +25 -0
- package/{chunk-gv7wqkey.js → chunk-9as0p561.js} +2 -2
- package/{chunk-fx7f4m3c.js → chunk-a1352w87.js} +1 -1
- package/{chunk-8wv5t0w6.js → chunk-a1rb1a48.js} +6 -6
- package/{chunk-bdy4jksd.js → chunk-a98wma9j.js} +1 -1
- package/{chunk-peja51xv.js → chunk-asyr3gnq.js} +2 -2
- package/{chunk-7hr6zw2m.js → chunk-ax04trym.js} +1 -1
- package/chunk-b2bxqeb4.js +2 -0
- package/{chunk-6kdgk70p.js → chunk-bdjr0kfr.js} +4 -4
- package/{chunk-dnx91jrd.js → chunk-bk4rpnm8.js} +2 -2
- package/{chunk-8x21n7y9.js → chunk-c0zfefq8.js} +1 -1
- package/{chunk-pg5nkf1y.js → chunk-c6q04xrd.js} +2 -2
- package/chunk-c71173py.js +25 -0
- package/{chunk-c7rcw9fb.js → chunk-cmwdjes8.js} +5 -5
- package/{chunk-j7yvh0ae.js → chunk-d0a1jxk5.js} +1 -1
- package/{chunk-0javrjcm.js → chunk-d5j74pcp.js} +22 -22
- package/{chunk-ca982n62.js → chunk-dfh9m9n7.js} +1 -1
- package/{chunk-s6dejhfj.js → chunk-dq01v5eq.js} +1 -1
- package/{chunk-ecf896fz.js → chunk-e1x629v0.js} +2 -2
- package/{chunk-053vb71h.js → chunk-en218k4y.js} +1 -1
- package/{chunk-ey15ye2h.js → chunk-fgwda4m0.js} +1 -1
- package/chunk-gbjn6d81.js +2 -0
- package/{chunk-n85qs7cs.js → chunk-gkf5jwvj.js} +1 -1
- package/{chunk-d48bfd2e.js → chunk-h1kb8b49.js} +2 -2
- package/{chunk-whj87h4r.js → chunk-hb4f2v34.js} +3 -3
- package/{chunk-10p3mb40.js → chunk-hbnmymaq.js} +1 -1
- package/{chunk-818nd6s1.js → chunk-jj4hqbrx.js} +2 -2
- package/{chunk-r8vvcp6c.js → chunk-jn5pqy5v.js} +1 -1
- package/{chunk-f544p9rh.js → chunk-jtsve11b.js} +10 -10
- package/chunk-m1eam0s5.js +2 -0
- package/{chunk-g0t9c3gv.js → chunk-mbpb5c7w.js} +1 -1
- package/{chunk-prgm07j4.js → chunk-msm9hmk9.js} +2 -2
- package/{chunk-dpz4hwqb.js → chunk-n0ybj4h9.js} +2 -2
- package/{chunk-z02sj1je.js → chunk-n2jcx65v.js} +2 -2
- package/{chunk-x4874m8e.js → chunk-nrsd810j.js} +2 -2
- package/chunk-pnspvnyd.js +2 -0
- package/chunk-pz2afna8.js +2 -0
- package/{chunk-f156y565.js → chunk-q9f4xb0w.js} +3 -3
- package/{chunk-arcqjt91.js → chunk-qaeyhe65.js} +1 -1
- package/chunk-qnkrrwmg.js +2 -0
- package/{chunk-063vbmtp.js → chunk-r4ttdkrz.js} +2 -2
- package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
- package/{chunk-q9dd6fhj.js → chunk-tevejprz.js} +4 -4
- package/{chunk-75434aay.js → chunk-v3ee9z3f.js} +1 -1
- package/chunk-vtqr7dm8.js +3 -0
- package/chunk-xh444pfn.js +16 -0
- package/{chunk-y69ewdn2.js → chunk-ypqjfv3a.js} +2 -2
- package/{chunk-d6p2hgxh.js → chunk-zc9ar0r4.js} +1 -1
- package/{chunk-s7skpgm2.js → chunk-zyyzk5ha.js} +1 -1
- package/compiled.js +9 -9
- package/package.json +1 -1
- package/ui-test-worker.js +19 -19
- package/web/chunk-08sq3cwm.js +1 -0
- package/web/chunk-0pghpg4y.js +2 -0
- package/web/{chunk-z1geewdf.js → chunk-0zwc2rvh.js} +2 -2
- package/web/chunk-12qf1r6m.js +1 -0
- package/web/chunk-24fjnnee.js +1 -0
- package/web/chunk-24jhbz82.js +24 -0
- package/web/{chunk-5wbnjjhg.js → chunk-2dvbeqt0.js} +1 -1
- package/web/chunk-2hrswh3d.js +2 -0
- package/web/chunk-2j2atyjw.js +1 -0
- package/web/{chunk-n754s8xd.js → chunk-2x4g9t37.js} +8 -8
- package/web/{chunk-tfn0rqg9.js → chunk-3ak5dg10.js} +25 -25
- package/web/chunk-3ecrkvr3.js +106 -0
- package/web/chunk-3h3g3ca3.js +1 -0
- package/web/chunk-3hr3ew9w.js +1 -0
- package/web/chunk-3pcrxg6m.js +1 -0
- package/web/{chunk-xckxtfp8.js → chunk-3pd0qt83.js} +72 -72
- package/web/chunk-3txxt0a7.js +1 -0
- package/web/chunk-43g4wd7a.js +1 -0
- package/web/chunk-4a6gdrbs.js +1 -0
- package/web/{chunk-twdy2f67.js → chunk-5a4mj3qz.js} +1 -1
- package/web/{chunk-q97hn4j5.js → chunk-5baeh8q7.js} +38 -38
- package/web/{chunk-4fm55fgb.js → chunk-5dr4tkem.js} +7 -7
- package/web/{chunk-wqsczy57.js → chunk-5jdrev9p.js} +9 -9
- package/web/{chunk-dg3p8db5.js → chunk-5v2c0aqk.js} +1 -1
- package/web/chunk-5z2n4z9x.css +1 -0
- package/web/{chunk-pjz30xcp.js → chunk-601k823s.js} +23 -23
- package/web/{chunk-2cem4sv7.js → chunk-60axh4sa.js} +25 -25
- package/web/chunk-66wb0p6e.js +62 -0
- package/web/{chunk-qcge7d6s.js → chunk-6e87m0nm.js} +2 -2
- package/web/chunk-6y55gk1n.js +1 -0
- package/web/chunk-79e08rk1.js +2 -0
- package/web/chunk-7qkav30b.js +2 -0
- package/web/chunk-7qq1ypvj.js +1 -0
- package/web/{chunk-h6k1x096.js → chunk-7tkgbbf9.js} +2 -2
- package/web/chunk-814kkkmq.js +8 -0
- package/web/chunk-8jcvdd5d.js +2 -0
- package/web/{chunk-gksf7cek.js → chunk-8w7fyb3v.js} +7 -7
- package/web/chunk-8w8atrdh.js +1 -0
- package/web/{chunk-czjk218p.js → chunk-8z0r0wtk.js} +62 -62
- package/web/chunk-935mjq1c.js +39 -0
- package/web/chunk-942g3eqn.js +1 -0
- package/web/{chunk-ht4mx2dt.js → chunk-98y92vmh.js} +9 -9
- package/web/chunk-9ctg0f30.js +3 -0
- package/web/chunk-9fnr00kv.js +4 -0
- package/web/{chunk-5nda24gv.js → chunk-9yfftz38.js} +1 -1
- package/web/chunk-a0ryzdnp.js +7 -0
- package/web/chunk-a61zrp66.js +1 -0
- package/web/{chunk-nfvqjzz5.js → chunk-af9evdza.js} +1 -1
- package/web/chunk-arnzrqnm.js +1 -0
- package/web/chunk-avxk6jpc.js +2 -0
- package/web/{chunk-c01176kn.js → chunk-awkdw9rw.js} +2 -2
- package/web/{chunk-sy7e4dmq.js → chunk-b5h52neg.js} +1 -1
- package/web/chunk-bwy3e58v.js +1 -0
- package/web/{chunk-ja7w629n.js → chunk-c57f714b.js} +2 -2
- package/web/chunk-c6yacwbc.js +30 -0
- package/web/chunk-ctzkqx2g.js +169 -0
- package/web/chunk-db3twjvk.js +21 -0
- package/web/{chunk-femhej5w.js → chunk-ddyyc20r.js} +57 -57
- package/web/chunk-dnv8dx72.js +1 -0
- package/web/chunk-dwjmr0zj.js +2 -0
- package/web/chunk-dz7g1gnv.js +2 -0
- package/web/chunk-eadfxfkw.js +1 -0
- package/web/{chunk-d9wdsjkk.js → chunk-eqndhs21.js} +2 -2
- package/web/chunk-ewx42c11.js +55 -0
- package/web/chunk-f7jpakwh.js +1 -0
- package/web/{chunk-4sve9xrj.js → chunk-ff1pmd3g.js} +1 -1
- package/web/chunk-fjb3ksfd.js +78 -0
- package/web/chunk-fpb2dd2d.js +2 -0
- package/web/{chunk-fv6vm14n.js → chunk-frnh4zqf.js} +2 -2
- package/web/chunk-gn8kyz76.js +7 -0
- package/web/chunk-gv99c8zv.js +1 -0
- package/web/chunk-h0767tjv.js +1 -0
- package/web/chunk-hqynf99g.js +1 -0
- package/web/{chunk-jam45rqg.js → chunk-jccz14ye.js} +2 -2
- package/web/chunk-kcjz03h5.js +2 -0
- package/web/chunk-ket6g0yd.js +1 -0
- package/web/chunk-m9q5nr8f.js +1 -0
- package/web/chunk-mbwwj216.js +1 -0
- package/web/chunk-mdfksj61.js +1 -0
- package/web/chunk-me7dza1c.js +1 -0
- package/web/{chunk-gyp6v7jd.js → chunk-myd6sc76.js} +2 -2
- package/web/{chunk-sf101c23.js → chunk-mykrm8ba.js} +2 -2
- package/web/chunk-mzzaet63.js +1 -0
- package/web/chunk-n0wazxgz.js +1 -0
- package/web/chunk-nnyc889n.js +292 -0
- package/web/{chunk-e8yj05t1.js → chunk-nvpp0ghj.js} +6 -6
- package/web/chunk-nvt9tkt4.js +1139 -0
- package/web/{chunk-sn3tkwme.js → chunk-p9hfcamx.js} +37 -37
- package/web/chunk-ph1dgffm.js +1 -0
- package/web/chunk-q34as3v6.js +1 -0
- package/web/{chunk-sd3cdqcm.js → chunk-qh62nkem.js} +2 -2
- package/web/{chunk-j1bw5v1g.js → chunk-qq6m2my8.js} +2 -2
- package/web/{chunk-tmndcktk.js → chunk-qsqtwf34.js} +15 -15
- package/web/chunk-qz6r9v1z.js +1 -0
- package/web/chunk-rad2s9ha.js +1 -0
- package/web/{chunk-y99ed8rd.js → chunk-rasjtvsb.js} +16 -16
- package/web/chunk-rayf24gy.js +370 -0
- package/web/chunk-rrpn5r5w.js +2 -0
- package/web/chunk-s37beysw.js +1 -0
- package/web/chunk-s60s09mb.js +1 -0
- package/web/chunk-sk1wkgjw.js +4 -0
- package/web/chunk-spbs56wz.js +34 -0
- package/web/chunk-t893141g.js +2 -0
- package/web/chunk-tftc5v89.js +24 -0
- package/web/chunk-tfvcs2xx.js +1 -0
- package/web/chunk-tj1fn8v2.js +1 -0
- package/web/chunk-ts6jsfdk.js +41 -0
- package/web/chunk-v1exk5wd.js +324 -0
- package/web/chunk-veam6vk4.js +303 -0
- package/web/chunk-vqmj6peg.js +1 -0
- package/web/{chunk-t6sq85s6.js → chunk-vsjpnwsr.js} +2 -2
- package/web/{chunk-0whceqes.js → chunk-vvvd3grf.js} +2 -2
- package/web/{chunk-svh4n157.js → chunk-w3w18stt.js} +5 -5
- package/web/chunk-wdq2tp9e.js +1 -0
- package/web/chunk-wkf5xfyr.js +1 -0
- package/web/{chunk-4q7wf0wd.js → chunk-wzd2a4k5.js} +9 -9
- package/web/chunk-xa43ndfj.js +2 -0
- package/web/chunk-xh4xn1az.js +1 -0
- package/web/chunk-xx11yv61.js +89 -0
- package/web/chunk-xzwxcxb4.js +1 -0
- package/web/chunk-y1qty77a.js +1 -0
- package/web/{chunk-da7m1kva.js → chunk-y2rzeb4v.js} +2 -2
- package/web/chunk-ys2tns0p.js +1 -0
- package/web/chunk-z05x9cbm.js +1 -0
- package/web/chunk-zb2bkr7f.js +2 -0
- package/web/{chunk-aangfjqc.js → chunk-zdyys4ar.js} +38 -38
- package/web/chunk-zgavhnt8.js +1 -0
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-654cny9a.js +0 -480
- package/chunk-8gw5bvh3.js +0 -25
- package/chunk-8saewt61.js +0 -3
- package/chunk-a0c989ky.js +0 -2
- package/chunk-a5apjjcn.js +0 -16
- package/chunk-a81p46j7.js +0 -2
- package/chunk-agsfy9w7.js +0 -2
- package/chunk-d20p02ny.js +0 -2
- package/chunk-ejsneb6f.js +0 -2
- package/chunk-fmq3zwzk.js +0 -2
- package/chunk-rfb85nj7.js +0 -2
- package/chunk-rfdt992v.js +0 -25
- package/web/chunk-079091ar.js +0 -39
- package/web/chunk-083r4f80.js +0 -1
- package/web/chunk-0cng7r2x.js +0 -2
- package/web/chunk-0k0ande6.js +0 -1
- package/web/chunk-14deqqhr.js +0 -2
- package/web/chunk-1s53190z.js +0 -303
- package/web/chunk-2b63adsj.js +0 -89
- package/web/chunk-3baypnwn.js +0 -4
- package/web/chunk-4067nwjp.js +0 -19
- package/web/chunk-4vjnrz87.js +0 -34
- package/web/chunk-59678wmg.js +0 -1
- package/web/chunk-5k8sv4f5.js +0 -1
- package/web/chunk-5vjhvw1m.js +0 -2
- package/web/chunk-6bwgdvf6.js +0 -1
- package/web/chunk-6ft5pz3c.js +0 -1
- package/web/chunk-7c8rwqtx.js +0 -1
- package/web/chunk-7qzz025k.js +0 -1
- package/web/chunk-7xbaqqd7.css +0 -1
- package/web/chunk-80eyv2mk.js +0 -1
- package/web/chunk-89paytbk.js +0 -4
- package/web/chunk-8ceej2g7.js +0 -1
- package/web/chunk-8nyhy122.js +0 -1
- package/web/chunk-8r0s8tx7.js +0 -1
- package/web/chunk-989jq2h8.js +0 -2
- package/web/chunk-9w5tf22s.js +0 -1
- package/web/chunk-ahztazsg.js +0 -1
- package/web/chunk-bdydzbqk.js +0 -324
- package/web/chunk-c3nn0vvc.js +0 -1
- package/web/chunk-cpwtt6ny.js +0 -1
- package/web/chunk-d22wq71s.js +0 -1
- package/web/chunk-dsw5t58p.js +0 -1
- package/web/chunk-dv72fat3.js +0 -1
- package/web/chunk-dvvs1jjq.js +0 -3
- package/web/chunk-e131rg6p.js +0 -2
- package/web/chunk-ekw54h1q.js +0 -1
- package/web/chunk-geh05ghh.js +0 -55
- package/web/chunk-hwsvhst3.js +0 -1
- package/web/chunk-jfvxxp5c.js +0 -1
- package/web/chunk-k02b36g1.js +0 -62
- package/web/chunk-kjacapzd.js +0 -7
- package/web/chunk-kkfrs7d1.js +0 -41
- package/web/chunk-kkyn8yhj.js +0 -106
- package/web/chunk-mh4rx5cf.js +0 -1
- package/web/chunk-mz9b5bsa.js +0 -1
- package/web/chunk-n448vaba.js +0 -1
- package/web/chunk-n8j88qxy.js +0 -1
- package/web/chunk-nmpbsvwb.js +0 -2
- package/web/chunk-nws1s56b.js +0 -1
- package/web/chunk-p7126wwy.js +0 -7
- package/web/chunk-phnqnhj9.js +0 -1
- package/web/chunk-q3jevm51.js +0 -292
- package/web/chunk-qg31p6cn.js +0 -1
- package/web/chunk-qhm3cfq9.js +0 -1
- package/web/chunk-qsd595b9.js +0 -1
- package/web/chunk-r7frwjqx.js +0 -2
- package/web/chunk-rddft5ce.js +0 -1139
- package/web/chunk-rgbdf2m9.js +0 -370
- package/web/chunk-rsbkbg6x.js +0 -78
- package/web/chunk-s2bs5vxh.js +0 -2
- package/web/chunk-sgwccs54.js +0 -1
- package/web/chunk-sjh8gtm9.js +0 -30
- package/web/chunk-t3658ehb.js +0 -2
- package/web/chunk-t81p4wqc.js +0 -24
- package/web/chunk-tewmsd7t.js +0 -1
- package/web/chunk-tf57s7ry.js +0 -1
- package/web/chunk-thbqwq6b.js +0 -1
- package/web/chunk-tqr80b5w.js +0 -2
- package/web/chunk-tz4twwmw.js +0 -2
- package/web/chunk-v282r683.js +0 -24
- package/web/chunk-v4vjjtn7.js +0 -1
- package/web/chunk-vbwdwcdp.js +0 -1
- package/web/chunk-vjngfh0q.js +0 -1
- package/web/chunk-vnt34mkb.js +0 -1
- package/web/chunk-wbgkwxrc.js +0 -1
- package/web/chunk-wjbk50hn.js +0 -2
- package/web/chunk-wjy848e2.js +0 -1
- package/web/chunk-wvfmmw1v.js +0 -8
- package/web/chunk-x1jm4zsg.js +0 -1
- package/web/chunk-xbpc6x9m.js +0 -169
- package/web/chunk-xce8n339.js +0 -1
- package/web/chunk-xmsb2g71.js +0 -1
- package/web/chunk-xtss82z2.js +0 -1
package/web/chunk-rsbkbg6x.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,ke,b,B,C,S,E,T,A,R,L,l,V,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var ot=e((r,i)=>{let n=r<=1?r*100:r;if(n<0||n>100)throw Error(`${i} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);return n},"toPercent"),j=e((r,i,n)=>({x:ot(i,`${n} evolution`),y:ot(r,`${n} visibility`)}),"toCoordinates"),pt=e((r)=>{if(!r)return;if(r==="+<>")return"bidirectional";if(r==="+<")return"backward";if(r==="+>")return"forward";return},"getFlowFromPort"),Bt=e((r)=>{if(!r?.startsWith("+"))return{};let n=/^\+'([^']*)'/.exec(r)?.[1];if(r.includes("<>"))return{flow:"bidirectional",label:n};if(r.includes("<"))return{flow:"backward",label:n};if(r.includes(">"))return{flow:"forward",label:n};return{label:n}},"extractFlowFromArrow"),Ft=e((r,i)=>{if(G(r,i),r.size)i.setSize(r.size.width,r.size.height);if(r.evolution){let n=r.evolution.stages.map((o)=>{if(o.secondName)return`${o.name.trim()} / ${o.secondName.trim()}`;return o.name.trim()}),y=r.evolution.stages.filter((o)=>o.boundary!==void 0).map((o)=>o.boundary);i.updateAxes({stages:n,stageBoundaries:y})}if(r.anchors.forEach((n)=>{let y=j(n.visibility,n.evolution,`Anchor "${n.name}"`);i.addNode(n.name,n.name,y.x,y.y,"anchor")}),r.components.forEach((n)=>{let y=j(n.visibility,n.evolution,`Component "${n.name}"`),o=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,p=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,k=n.decorator?.strategy;i.addNode(n.name,n.name,y.x,y.y,"component",o,p,n.inertia,k)}),r.notes.forEach((n)=>{let y=j(n.visibility,n.evolution,`Note "${n.text}"`);i.addNote(n.text,y.x,y.y)}),r.pipelines.forEach((n)=>{let y=i.getNode(n.parent);if(!y||typeof y.y!=="number")throw Error(`Pipeline "${n.parent}" must reference an existing component with coordinates.`);let o=y.y;i.startPipeline(n.parent),n.components.forEach((p)=>{let k=`${n.parent}_${p.name}`,H=p.label?(p.label.negX?-1:1)*p.label.offsetX:void 0,w=p.label?(p.label.negY?-1:1)*p.label.offsetY:void 0,tt=ot(p.evolution,`Pipeline component "${p.name}" evolution`);i.addNode(k,p.name,tt,o,"pipeline-component",H,w),i.addPipelineComponent(n.parent,k)})}),r.links.forEach((n)=>{let y=!!n.arrow&&(n.arrow.includes("-.->")||n.arrow.includes(".-.")),o=pt(n.fromPort)??pt(n.toPort),{flow:p,label:k}=Bt(n.arrow);if(!o&&p)o=p;let H=n.linkLabel,w=k??H;i.addLink(i.resolveNodeId(n.from),i.resolveNodeId(n.to),y,w,o)}),r.evolves.forEach((n)=>{let y=i.getNode(n.component);if(y?.y!==void 0){let o=ot(n.target,`Evolve target for "${n.component}"`);i.addTrend(n.component,o,y.y)}}),r.annotations.length>0){let n=r.annotations[0],y=j(n.x,n.y,"Annotations box");i.setAnnotationsBox(y.x,y.y)}r.annotation.forEach((n)=>{let y=j(n.x,n.y,`Annotation ${n.number}`);i.addAnnotation(n.number,[{x:y.x,y:y.y}],n.text)}),r.accelerators.forEach((n)=>{let y=j(n.x,n.y,`Accelerator "${n.name}"`);i.addAccelerator(n.name,y.x,y.y)}),r.deaccelerators.forEach((n)=>{let y=j(n.x,n.y,`Deaccelerator "${n.name}"`);i.addDeaccelerator(n.name,y.x,y.y)})},"populateDb"),ht={parser:{yy:void 0},parse:e(async(r)=>{let i=await X("wardley",r);a.debug(i);let n=ht.parser?.yy;if(!n||typeof n.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ft(i,n)},"parse")},Rt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,"WardleyBuilder")}addNode(r){let i=this.nodes.get(r.id)??{id:r.id,label:r.label},n={...i,...r,className:r.className??i.className,labelOffsetX:r.labelOffsetX??i.labelOffsetX,labelOffsetY:r.labelOffsetY??i.labelOffsetY};this.nodes.set(r.id,n)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});let i=this.nodes.get(r);if(i)i.isPipelineParent=!0}addPipelineComponent(r,i){let n=this.pipelines.get(r);if(n)n.componentIds.push(i);let y=this.nodes.get(i);if(y)y.inPipeline=!0}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,i){this.annotationsBox={x:r,y:i}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,i){this.size={width:r,height:i}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(let[i,n]of this.nodes)if(n.label===r)return i;return r}build(){let r=[];for(let i of this.nodes.values()){if(typeof i.x!=="number"||typeof i.y!=="number")throw Error(`Node "${i.label}" is missing coordinates`);r.push(i)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Rt;function ft(){return l()["wardley-beta"]}e(ft,"getConfig");function xt(r,i,n,y,o,p,k,H,w){P.addNode({id:r,label:i,x:n,y,className:o,labelOffsetX:p,labelOffsetY:k,inertia:H,sourceStrategy:w})}e(xt,"addNode");function gt(r,i,n=!1,y,o){P.addLink({source:r,target:i,dashed:n,label:y,flow:o})}e(gt,"addLink");function yt(r,i,n){P.addTrend({nodeId:r,targetX:i,targetY:n})}e(yt,"addTrend");function ut(r,i,n){P.addAnnotation({number:r,coordinates:i,text:n})}e(ut,"addAnnotation");function wt(r,i,n){P.addNote({text:r,x:i,y:n})}e(wt,"addNote");function mt(r,i,n){P.addAccelerator({name:r,x:i,y:n})}e(mt,"addAccelerator");function kt(r,i,n){P.addDeaccelerator({name:r,x:i,y:n})}e(kt,"addDeaccelerator");function bt(r,i){P.setAnnotationsBox(r,i)}e(bt,"setAnnotationsBox");function $t(r,i){P.setSize(r,i)}e($t,"setSize");function vt(r){P.startPipeline(r)}e(vt,"startPipeline");function Pt(r,i){P.addPipelineComponent(r,i)}e(Pt,"addPipelineComponent");function Ct(r){P.setAxes(r)}e(Ct,"updateAxes");function St(r){return P.getNode(r)}e(St,"getNode");function Mt(r){return P.resolveNodeId(r)}e(Mt,"resolveNodeId");function Nt(){return P.build()}e(Nt,"getWardleyData");function zt(){P.clear(),C()}e(zt,"clear");var Ot={getConfig:ft,addNode:xt,addLink:gt,addTrend:yt,addAnnotation:ut,addNote:wt,addAccelerator:mt,addDeaccelerator:kt,setAnnotationsBox:bt,setSize:$t,startPipeline:vt,addPipelineComponent:Pt,updateAxes:Ct,getNode:St,resolveNodeId:Mt,getWardleyData:Nt,clear:zt,setAccTitle:S,getAccTitle:E,setDiagramTitle:R,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},Dt=["Genesis","Custom Built","Product","Commodity"],Gt=e(()=>{let{themeVariables:r}=l();return{backgroundColor:r.wardley?.backgroundColor??r.background??"#fff",axisColor:r.wardley?.axisColor??"#000",axisTextColor:r.wardley?.axisTextColor??r.primaryTextColor??"#222",gridColor:r.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:r.wardley?.componentFill??"#fff",componentStroke:r.wardley?.componentStroke??"#000",componentLabelColor:r.wardley?.componentLabelColor??r.primaryTextColor??"#222",linkStroke:r.wardley?.linkStroke??"#000",evolutionStroke:r.wardley?.evolutionStroke??"#dc3545",annotationStroke:r.wardley?.annotationStroke??"#000",annotationTextColor:r.wardley?.annotationTextColor??r.primaryTextColor??"#222",annotationFill:r.wardley?.annotationFill??r.background??"#fff"}},"getTheme"),qt=e(()=>{let r=l()["wardley-beta"];return{width:r?.width??900,height:r?.height??600,padding:r?.padding??48,nodeRadius:r?.nodeRadius??6,nodeLabelOffset:r?.nodeLabelOffset??8,axisFontSize:r?.axisFontSize??12,labelFontSize:r?.labelFontSize??10,showGrid:r?.showGrid??!1,useMaxWidth:r?.useMaxWidth??!0}},"getConfigValues"),jt=e((r,i,n,y)=>{a.debug(`Rendering Wardley map
|
|
2
|
-
`+r);let o=qt(),p=Gt(),k=o.nodeRadius*1.6,H=y.db,w=H.getWardleyData(),tt=H.getDiagramTitle(),Y=w.size?.width??o.width,M=w.size?.height??o.height,Z=V(i);Z.selectAll("*").remove(),B(Z,M,Y,o.useMaxWidth),Z.attr("viewBox",`0 0 ${Y} ${M}`);let z=Z.append("g").attr("class","wardley-map"),nt=Z.append("defs");nt.append("marker").attr("id",`arrow-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.evolutionStroke).attr("stroke","none"),nt.append("marker").attr("id",`link-arrow-end-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.linkStroke).attr("stroke","none"),nt.append("marker").attr("id",`link-arrow-start-${i}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",p.linkStroke).attr("stroke","none"),z.append("rect").attr("class","wardley-background").attr("width",Y).attr("height",M).attr("fill",p.backgroundColor);let J=Y-o.padding*2,K=M-o.padding*2;if(tt)z.append("text").attr("class","wardley-title").attr("x",Y/2).attr("y",o.padding/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(tt);let O=e((t)=>o.padding+t/100*J,"projectX"),D=e((t)=>M-o.padding-t/100*K,"projectY"),et=z.append("g").attr("class","wardley-axes");et.append("line").attr("x1",o.padding).attr("x2",Y-o.padding).attr("y1",M-o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1),et.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1);let Lt=w.axes.xLabel??"Evolution",Tt=w.axes.yLabel??"Visibility";et.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+J/2).attr("y",M-o.padding/4).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Lt),et.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+K/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+K/2})`).text(Tt);let Q=w.axes.stages&&w.axes.stages.length>0?w.axes.stages:Dt;if(Q.length>0){let t=z.append("g").attr("class","wardley-stages"),d=w.axes.stageBoundaries,s=[];if(d&&d.length===Q.length){let c=0;d.forEach((f)=>{s.push({start:c,end:f}),c=f})}else{let c=1/Q.length;Q.forEach((f,x)=>{s.push({start:x*c,end:(x+1)*c})})}Q.forEach((c,f)=>{let x=s[f],u=o.padding+x.start*J,g=o.padding+x.end*J,m=(u+g)/2;if(f>0)t.append("line").attr("x1",u).attr("x2",u).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);t.append("text").attr("class","wardley-stage-label").attr("x",m).attr("y",M-o.padding/1.5).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(c)})}if(o.showGrid){let t=z.append("g").attr("class","wardley-grid");for(let d=1;d<4;d++){let s=d/4,c=o.padding+J*s;t.append("line").attr("x1",c).attr("x2",c).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",Y-o.padding).attr("y1",M-o.padding-K*s).attr("y2",M-o.padding-K*s).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(w.nodes.forEach((t)=>{h.set(t.id,{x:O(t.x),y:D(t.y),node:t})}),w.pipelines.length>0){let t=z.append("g").attr("class","wardley-pipelines"),d=z.append("g").attr("class","wardley-pipeline-links");w.pipelines.forEach((s)=>{if(s.componentIds.length===0)return;let c=s.componentIds.map((g)=>({id:g,pos:h.get(g),node:w.nodes.find((m)=>m.id===g)})).filter((g)=>g.pos&&g.node).sort((g,m)=>g.node.x-m.node.x);for(let g=0;g<c.length-1;g++){let m=c[g],v=c[g+1];d.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",v.pos.x).attr("y2",v.pos.y).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let f=1/0,x=-1/0,u=0;if(s.componentIds.forEach((g)=>{let m=h.get(g);if(m)f=Math.min(f,m.x),x=Math.max(x,m.x),u=m.y}),f!==1/0&&x!==-1/0){let m=o.nodeRadius*4,v=u-m/2,W=h.get(s.nodeId);if(W){let F=(f+x)/2;W.x=F,W.y=v-k/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",v).attr("width",x-f+30).attr("height",m).attr("fill","none").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let dt=z.append("g").attr("class","wardley-links"),lt=new Map;w.pipelines.forEach((t)=>{lt.set(t.nodeId,new Set(t.componentIds))});let ct=w.links.filter((t)=>{if(!h.has(t.source)||!h.has(t.target))return!1;if(lt.get(t.target)?.has(t.source))return!1;return!0});dt.selectAll("line").data(ct).enter().append("line").attr("class",(t)=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.source).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=s.x-d.x,u=s.y-d.y,g=Math.sqrt(x*x+u*u);return d.x+x/g*f}).attr("y1",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.source).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=s.x-d.x,u=s.y-d.y,g=Math.sqrt(x*x+u*u);return d.y+u/g*f}).attr("x2",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.target).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=d.x-s.x,u=d.y-s.y,g=Math.sqrt(x*x+u*u);return s.x+x/g*f}).attr("y2",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.target).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=d.x-s.x,u=d.y-s.y,g=Math.sqrt(x*x+u*u);return s.y+u/g*f}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(t)=>t.dashed?"6 6":null).attr("marker-end",(t)=>{if(t.flow==="forward"||t.flow==="bidirectional")return`url(#link-arrow-end-${i})`;return null}).attr("marker-start",(t)=>{if(t.flow==="backward"||t.flow==="bidirectional")return`url(#link-arrow-start-${i})`;return null}),dt.selectAll("text").data(ct.filter((t)=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(t)=>{let d=h.get(t.source),s=h.get(t.target),c=(d.x+s.x)/2,f=s.y-d.y,x=s.x-d.x,u=Math.sqrt(x*x+f*f),g=8,m=f/u;return c+m*8}).attr("y",(t)=>{let d=h.get(t.source),s=h.get(t.target),c=(d.y+s.y)/2,f=s.x-d.x,x=s.y-d.y,u=Math.sqrt(f*f+x*x),g=8,m=-f/u;return c+m*8}).attr("fill",p.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(t)=>{let d=h.get(t.source),s=h.get(t.target),c=(d.x+s.x)/2,f=(d.y+s.y)/2,x=s.x-d.x,u=s.y-d.y,g=Math.sqrt(x*x+u*u),m=8,v=u/g,W=-x/g,F=c+v*8,at=f+W*8,_=Math.atan2(u,x)*180/Math.PI;if(_>90||_<-90)_+=180;return`rotate(${_} ${F} ${at})`}).text((t)=>t.label);let Wt=z.append("g").attr("class","wardley-trends"),At=w.trends.map((t)=>{let d=h.get(t.nodeId);if(!d)return null;let s=O(t.targetX),c=D(t.targetY),f=s-d.x,x=c-d.y,u=Math.sqrt(f*f+x*x),g=o.nodeRadius+2,m=u>g?s-f/u*g:s,v=u>g?c-x/u*g:c;return{origin:d,targetX:s,targetY:c,adjustedX2:m,adjustedY2:v}}).filter((t)=>t!==null);Wt.selectAll("line").data(At).enter().append("line").attr("class","wardley-trend").attr("x1",(t)=>t.origin.x).attr("y1",(t)=>t.origin.y).attr("x2",(t)=>t.adjustedX2).attr("y2",(t)=>t.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${i})`);let I=z.append("g").attr("class","wardley-nodes").selectAll("g").data(w.nodes).enter().append("g").attr("class",(t)=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));I.filter((t)=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let q=I.filter((t)=>t.sourceStrategy==="market");q.append("circle").attr("class","wardley-market-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1);let st=o.nodeRadius*0.7,N=o.nodeRadius*1.2;if(q.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x).attr("y1",(t)=>h.get(t.id).y-N).attr("x2",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("y2",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),q.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("y1",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("x2",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("y2",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),q.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("y1",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("x2",(t)=>h.get(t.id).x).attr("y2",(t)=>h.get(t.id).y-N).attr("stroke",p.componentStroke).attr("stroke-width",1),q.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y-N).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),q.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("cy",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),q.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("cy",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),I.filter((t)=>t.isPipelineParent===!0).append("rect").attr("x",(t)=>h.get(t.id).x-k/2).attr("y",(t)=>h.get(t.id).y-k/2).attr("width",k).attr("height",k).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k/2+15:o.nodeRadius+15;if(t.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y1",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k:o.nodeRadius*2;return d.y-s/2}).attr("x2",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k/2+15:o.nodeRadius+15;if(t.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y2",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k:o.nodeRadius*2;return d.y+s/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),I.append("text").attr("x",(t)=>{let d=h.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?d.x+t.labelOffsetX:d.x;let s=o.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetX===void 0)s+=10;let c=t.labelOffsetX??s;return d.x+c}).attr("y",(t)=>{let d=h.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?d.y+t.labelOffsetY:d.y-3;let s=-o.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetY===void 0)s-=10;let c=t.labelOffsetY??s;return d.y+c}).attr("class","wardley-node-label").attr("fill",(t)=>{if(t.className==="evolved")return p.evolutionStroke;if(t.className==="anchor")return"#000";return p.componentLabelColor}).attr("font-size",o.labelFontSize).attr("font-weight",(t)=>t.className==="anchor"?"bold":"normal").attr("text-anchor",(t)=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",(t)=>t.className==="anchor"?"middle":"auto").text((t)=>t.label),w.annotations.length>0){let t=z.append("g").attr("class","wardley-annotations");if(w.annotations.forEach((d)=>{let s=d.coordinates.map((c)=>({x:O(c.x),y:D(c.y)}));if(s.length>1)for(let c=0;c<s.length-1;c++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[c].x).attr("y1",s[c].y).attr("x2",s[c+1].x).attr("y2",s[c+1].y).attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach((c)=>{let f=t.append("g").attr("class","wardley-annotation");f.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5),f.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.number)})}),w.annotationsBox){let d=O(w.annotationsBox.x),s=D(w.annotationsBox.y),c=10,f=16,x=11,u=t.append("g").attr("class","wardley-annotations-box"),g=[...w.annotations].filter((v)=>v.text).sort((v,W)=>v.number-W.number),m=[];if(g.forEach((v,W)=>{let F=u.append("text").attr("x",d+c).attr("y",s+c+(W+1)*f).attr("font-size",x).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${v.number}. ${v.text}`);m.push(F)}),m.length>0){let v=0,W=0;m.forEach((it)=>{let rt=it.node(),Yt=rt.getComputedTextLength();v=Math.max(v,Yt);let It=rt.getBBox();W=Math.max(W,It.height)});let F=v+c*2+105,at=g.length*f+c*2+W/2,_=o.padding,Xt=Y-o.padding-F,Et=o.padding,Ht=M-o.padding-at;d=Math.max(_,Math.min(d,Xt)),s=Math.max(Et,Math.min(s,Ht)),m.forEach((it,rt)=>{it.attr("x",d+c).attr("y",s+c+(rt+1)*f)}),u.insert("rect","text").attr("x",d).attr("y",s).attr("width",F).attr("height",at).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(w.notes.length>0){let t=z.append("g").attr("class","wardley-notes");w.notes.forEach((d)=>{let s=O(d.x),c=D(d.y);t.append("text").attr("x",s).attr("y",c).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.text)})}if(w.accelerators.length>0){let t=z.append("g").attr("class","wardley-accelerators");w.accelerators.forEach((d)=>{let s=O(d.x),c=D(d.y),f=60,x=30,u=20,g=`
|
|
3
|
-
M ${s} ${c-15}
|
|
4
|
-
L ${s+60-20} ${c-15}
|
|
5
|
-
L ${s+60-20} ${c-15-8}
|
|
6
|
-
L ${s+60} ${c}
|
|
7
|
-
L ${s+60-20} ${c+15+8}
|
|
8
|
-
L ${s+60-20} ${c+15}
|
|
9
|
-
L ${s} ${c+15}
|
|
10
|
-
Z
|
|
11
|
-
`;t.append("path").attr("d",g).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}if(w.deaccelerators.length>0){let t=z.append("g").attr("class","wardley-deaccelerators");w.deaccelerators.forEach((d)=>{let s=O(d.x),c=D(d.y),f=60,x=30,u=20,g=`
|
|
12
|
-
M ${s+60} ${c-15}
|
|
13
|
-
L ${s+20} ${c-15}
|
|
14
|
-
L ${s+20} ${c-15-8}
|
|
15
|
-
L ${s} ${c}
|
|
16
|
-
L ${s+20} ${c+15+8}
|
|
17
|
-
L ${s+20} ${c+15}
|
|
18
|
-
L ${s+60} ${c+15}
|
|
19
|
-
Z
|
|
20
|
-
`;t.append("path").attr("d",g).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}},"draw"),Vt={draw:jt},_t=e(({wardley:r}={})=>{let i=ke(),n=b(),y=U(i,n.themeVariables),o=U(y.wardley,r);return`
|
|
21
|
-
.wardley-background {
|
|
22
|
-
fill: ${o.backgroundColor};
|
|
23
|
-
}
|
|
24
|
-
.wardley-axes line, .wardley-axes path {
|
|
25
|
-
stroke: ${o.axisColor};
|
|
26
|
-
}
|
|
27
|
-
.wardley-axis-label {
|
|
28
|
-
fill: ${o.axisTextColor};
|
|
29
|
-
}
|
|
30
|
-
.wardley-stage-label {
|
|
31
|
-
fill: ${o.axisTextColor};
|
|
32
|
-
}
|
|
33
|
-
.wardley-grid line {
|
|
34
|
-
stroke: ${o.gridColor};
|
|
35
|
-
}
|
|
36
|
-
.wardley-node circle {
|
|
37
|
-
fill: ${o.componentFill};
|
|
38
|
-
stroke: ${o.componentStroke};
|
|
39
|
-
}
|
|
40
|
-
.wardley-node-label {
|
|
41
|
-
fill: ${o.componentLabelColor};
|
|
42
|
-
}
|
|
43
|
-
.wardley-link {
|
|
44
|
-
stroke: ${o.linkStroke};
|
|
45
|
-
}
|
|
46
|
-
.wardley-link--dashed {
|
|
47
|
-
stroke-dasharray: 4 4;
|
|
48
|
-
}
|
|
49
|
-
.wardley-link-label {
|
|
50
|
-
fill: ${o.axisTextColor};
|
|
51
|
-
}
|
|
52
|
-
.wardley-trend line {
|
|
53
|
-
stroke: ${o.evolutionStroke};
|
|
54
|
-
}
|
|
55
|
-
.wardley-annotation-line {
|
|
56
|
-
stroke: ${o.annotationStroke};
|
|
57
|
-
}
|
|
58
|
-
.wardley-annotation circle {
|
|
59
|
-
fill: ${o.annotationFill};
|
|
60
|
-
stroke: ${o.annotationStroke};
|
|
61
|
-
}
|
|
62
|
-
.wardley-annotation text {
|
|
63
|
-
fill: ${o.annotationTextColor};
|
|
64
|
-
}
|
|
65
|
-
.wardley-annotations-box rect {
|
|
66
|
-
fill: ${o.annotationFill};
|
|
67
|
-
stroke: ${o.annotationStroke};
|
|
68
|
-
}
|
|
69
|
-
.wardley-annotations-box text {
|
|
70
|
-
fill: ${o.annotationTextColor};
|
|
71
|
-
}
|
|
72
|
-
.wardley-pipeline-box {
|
|
73
|
-
stroke: ${o.componentStroke};
|
|
74
|
-
}
|
|
75
|
-
.wardley-notes text {
|
|
76
|
-
fill: ${o.axisTextColor};
|
|
77
|
-
}
|
|
78
|
-
`},"styles"),re={parser:ht,db:Ot,renderer:Vt,styles:_t};export{re as diagram};
|
package/web/chunk-s2bs5vxh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e,a,b,l,M,P,Tt,Et,yo,yt,tn,vo,Yn,Pe,bo,Wi,At,Gi,nn,Xn}from"./chunk-1s53190z.js";import{te}from"./chunk-tz4twwmw.js";import{x}from"./chunk-rddft5ce.js";function la(t,{edgePathsClass:r="edges edgePaths"}={}){let n=t.insert("g").attr("class","root"),i=n.insert("g").attr("class","clusters"),s=n.insert("g").attr("class",r),o=n.insert("g").attr("class","edgeLabels"),u=n.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:u,rootGroups:n}}e(la,"createLayoutElementGroups");async function D(t,r,n){if(r.label){let{shapeSvg:i,bbox:s}=await P(t,n===void 0?r:{...r,width:n});r.labelBBox={width:s.width,height:s.height},i.remove()}else r.labelBBox={width:0,height:0}}e(D,"measureGroupLabel");async function ca(t,r,n){let i=await Et(t,r,n),s=i.node()?.getBBox()??{width:0,height:0};return r.width=s.width,r.height=s.height,i}e(ca,"insertMeasuredNode");function S(t,r,n){let i=t,s=new Set;while(i){if(i.dir)return i.dir;if(!i.parentId||s.has(i.parentId))break;s.add(i.parentId),i=r.get(i.parentId)}return n}e(S,"resolveNodeDir");async function k(t,r,n={}){let i=new te({multigraph:!0,compound:!0}),s=[...r.edges],o=l(),u=la(t),{edgeLabels:d,nodes:c}=u,g=new Map,h=new Map(r.nodes.map((f)=>[f.id,f])),C=r.direction,w=t.node()!=null;await Promise.all(r.nodes.map(async(f)=>{if(f.isGroup){if(w){let p=n.unwrapGroupLabels&&f.labelType!=="markdown";await D(c,f,p?Number.POSITIVE_INFINITY:void 0)}i.setNode(f.id,{...f})}else{if(w){let p=await ca(c,f,{config:o,dir:S(f,h,C)});g.set(f.id,p)}i.setNode(f.id,{...f})}}));for(let f of s){if(w&&Wi(f))await At(d,f);if(i.setEdge(f.start,f.end,{...f},f.id),!r.edges.some((E)=>E.id===f.id))r.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (x("tewmsd7t"),import("./chunk-tewmsd7t.js"));f(t,r)}return{graph:i,groups:u,nodeElements:g}}e(k,"createGraphWithElements");var W=new Map,m=new Map,R=new Map,U=e(()=>{m.clear(),R.clear(),W.clear()},"clear"),v=e((t,r)=>{let n=m.get(r)||[];return a.trace("In isDescendant",r," ",t," = ",n.includes(t)),n.includes(t)},"isDescendant"),Z=e((t,r)=>{let n=m.get(r)||[];if(a.info("Descendants of ",r," is ",n),a.info("Edge is ",t),t.v===r||t.w===r)return!1;if(!n)return a.debug("Tilt, ",r,",not in descendants"),!1;return n.includes(t.v)||v(t.v,r)||v(t.w,r)||n.includes(t.w)},"edgeInCluster"),T=e((t,r,n,i)=>{a.debug("Copying children of ",t,"root",i,"data",r.node(t),i);let s=r.children(t)||[];if(t!==i)s.push(t);a.debug("Copying (nodes) clusterId",t,"nodes",s),s.forEach((o)=>{if(r.children(o).length>0)T(o,r,n,i);else{let u=r.node(o);if(a.info("cp ",o," to ",i," with parent ",t),n.setNode(o,u),i!==r.parent(o))a.debug("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o));if(t!==i&&o!==t)a.debug("Setting parent",o,t),n.setParent(o,t);else a.info("In copy ",t,"root",i,"data",r.node(t),i),a.debug("Not Setting parent for node=",o,"cluster!==rootId",t!==i,"node!==clusterId",o!==t);let d=r.edges(o);a.debug("Copying Edges",d),d.forEach((c)=>{a.info("Edge",c);let g=r.edge(c.v,c.w,c.name);a.info("Edge data",g,i);try{if(Z(c,i))a.info("Copying as ",c.v,c.w,g,c.name),n.setEdge(c.v,c.w,g,c.name),a.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else a.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",i," clusterId:",t)}catch(h){a.error(h)}})}a.debug("Removing node",o),r.removeNode(o)})},"copy"),B=e((t,r)=>{let n=r.children(t),i=[...n];for(let s of n)R.set(s,t),i=[...i,...B(s,r)];return i},"extractDescendants"),I=e((t,r,n)=>{let i=t.edges().filter((c)=>c.v===r||c.w===r),s=t.edges().filter((c)=>c.v===n||c.w===n),o=i.map((c)=>({v:c.v===r?n:c.v,w:c.w===r?r:c.w})),u=s.map((c)=>({v:c.v,w:c.w}));return o.filter((c)=>u.some((g)=>c.v===g.v&&c.w===g.w))},"findCommonEdges"),Fn=e((t,r,n)=>{let i=r.children(t);if(a.trace("Searching children of id ",t,i),i.length<1)return t;let s;for(let o of i){let u=Fn(o,r,n),d=I(r,n,u);if(u)if(d.length>0)s=u;else return u}return s},"findNonClusterChild"),L=e((t)=>{if(!W.has(t))return t;if(!W.get(t).externalConnections)return t;if(W.has(t))return W.get(t).id;return t},"getAnchorId"),to=e((t,r)=>{if(!t||r>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");t.nodes().forEach(function(n){if(t.children(n).length>0)a.debug("Cluster identified",n," Replacement id in edges: ",Fn(n,t,n)),m.set(n,B(n,t)),W.set(n,{id:Fn(n,t,n),clusterData:t.node(n)})}),t.nodes().forEach(function(n){let i=t.children(n),s=t.edges();if(i.length>0)a.debug("Cluster identified",n,m),s.forEach((o)=>{let u=v(o.v,n),d=v(o.w,n);if(u^d)a.debug("Edge: ",o," leaves cluster ",n),a.debug("Descendants of XXX ",n,": ",m.get(n)),W.get(n).externalConnections=!0});else a.debug("Not a cluster ",n,m)});for(let n of W.keys()){let i=W.get(n).id,s=t.parent(i);if(s!==n&&W.has(s)&&!W.get(s).externalConnections)W.get(n).id=s;let o=t.edges().some((u)=>u.v===n);if(i&&W.get(n)?.externalConnections&&o&&_(t,i,n)){let u=ee(t,n,t.parent(i));if(u)W.get(n).id=u}}t.edges().forEach(function(n){let i=t.edge(n);a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(t.edge(n)));let{v:s,w:o}=n;if(a.debug("Fix XXX",W,"ids:",n.v,n.w,"Translating: ",W.get(n.v)," --- ",W.get(n.w)),W.get(n.v)||W.get(n.w)){if(a.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),s=L(n.v),o=L(n.w),t.removeEdge(n.v,n.w,n.name),s!==n.v){let u=t.parent(s);W.get(u).externalConnections=!0,i.fromCluster=n.v}if(o!==n.w){let u=t.parent(o);W.get(u).externalConnections=!0,i.toCluster=n.w}a.debug("Fix Replacing with XXX",s,o,n.name),t.setEdge(s,o,i,n.name)}}),A(t,0),a.trace(W)},"adjustClustersAndEdges"),A=e((t,r)=>{if(r>10){a.error("Bailing out");return}let n=t.nodes(),i=!1;for(let s of n){let o=t.children(s);i=i||o.length>0}if(!i){a.debug("Done, no node has children",t.nodes());return}a.debug("Nodes = ",n,r);for(let s of n)if(a.debug("Extracting node",s,W,W.has(s)&&!W.get(s).externalConnections,!t.parent(s),t.node(s),t.children("D")," Depth ",r),!W.has(s))a.debug("Not a cluster",s,r);else if(!W.get(s).externalConnections&&t.children(s)&&t.children(s).length>0){a.debug("Cluster without external connections, without a parent and with children",s,r);let u=t.graph().rankdir==="TB"?"LR":"TB";if(W.get(s)?.clusterData?.dir)u=W.get(s).clusterData.dir,a.debug("Fixing dir",W.get(s).clusterData.dir,u);let d=new te({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});T(s,t,d,s),t.setNode(s,{clusterNode:!0,id:s,clusterData:W.get(s).clusterData,label:W.get(s).label,graph:d})}else a.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!W.get(s).externalConnections," no parent: ",!t.parent(s)," children ",t.children(s)&&t.children(s).length>0,t.children("D"),r),a.debug(W);n=t.nodes(),a.debug("New list of nodes",n);for(let s of n){let o=t.node(s);if(a.debug(" Now next level",s,o),o?.clusterNode)A(o.graph,r+1)}},"extractor"),X=e((t,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach((i)=>{let s=t.children(i),o=X(t,s);n=[...n,...o]}),n},"sorter"),ua=e((t)=>X(t,t.children()),"sortNodesByHierarchy"),_=e((t,r,n)=>{let i=t.parent(r);while(i&&i!==n){let s=W.get(i);if(s&&!s.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),ee=e((t,r,n)=>{let i=t.children(r)??[];for(let s of i){if(s===n||v(s,n))continue;let o=Fn(s,t,r);if(!o)continue;if(!_(t,o,r))return o}return null},"findSafeAnchorNode");function cr({prepareLayout:t,measureLayout:r,runLayoutCore:n,paintLayout:i,afterPaint:s,paintOptions:o}){let u=r??O;return e(async function(c,g,h,C){let w=g.select("g");(h?.insertMarkers??Xn)(w,c.markers,c.type,c.diagramId),G();let f={element:w,helpers:h,options:C};f.preparedLayout=await t?.(c,f);let p=await u(c,f),E=await n(c,f),N={...f,measure:p};if(i)await i(c,N,E);else await F(c,N,o);await s?.(c,N,E)},"render")}e(cr,"createCommonLayoutRenderer");function G(){yo(),bo(),vo(),U()}e(G,"clearLayoutRenderState");async function O(t,{element:r},n){return await k(r,t,n)}e(O,"defaultMeasureLayout");async function F(t,r,n={}){let{measure:i}=r,{groups:s}=i;for(let u of n.getNodes?.(t,r)??t.nodes){if(n.skipNode?.(u,r))continue;await j(s,u,r,n)}let o=z(t.nodes);for(let u of t.edges){if(J(u,n))continue;await V(s,u,o,t,n,r)}}e(F,"paintLayoutData");async function j(t,r,n,i){if(r.clusterNode)yt(r);else if(H(r,n,i))await tn(t.clusters,r);else yt(r)}e(j,"paintLayoutNode");function H(t,r,n){return t.isGroup===!0&&(n.isCluster?.(t,r)??!0)}e(H,"shouldPaintAsCluster");function z(t){let r=new Map;for(let n of t)if(n?.id)r.set(n.id,n);return r}e(z,"buildNodeLookup");function J(t,r){return t.isLayoutOnly||Boolean(r.skipEdge?.(t))}e(J,"shouldSkipPaintEdge");async function V(t,r,n,i,s,o){let u=nn(t.edgePaths,{...r},s.clusterDb??new Map,i.type,y(r.start,r,n,o,s),y(r.end,r,n,o,s),i.diagramId,Y(r,s),i.layoutAlgorithm);if(Wi(r)){if(!Yn.has(r.id))await At(t.edgeLabels,r);q(r,u)}}e(V,"paintLayoutEdge");function y(t,r,n,i,s){return s.getEdgeNode?.(t,r,i)??(t?n.get(t)??{}:{})}e(y,"getRenderedNode");function Y(t,r){return typeof r.skipIntersect==="function"?r.skipIntersect(t):r.skipIntersect??!1}e(Y,"shouldSkipIntersect");function q(t,r){let n=r?.updatedPath??r?.originalPath,i=b(),{subGraphTitleTotalMargin:s}=Tt({flowchart:i.flowchart??{}});if(t.label){let o=Yn.get(t.id),{x:u,y:d}=Gi(t,r);o.attr("transform",`translate(${u}, ${d+s/2})`)}for(let[o,u]of[["startLeft",t.startLabelLeft],["startRight",t.startLabelRight],["endLeft",t.endLabelLeft],["endRight",t.endLabelRight]])if(u){let{x:d,y:c}=K(t,o,n);Pe.get(t.id)[o].attr("transform",`translate(${d}, ${c})`)}}e(q,"positionRenderedEdgeLabel");var ne={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function K(t,r,n){let i=t.terminalLabelCenters?.[r];if(i)return{...i};if(!n)return{x:t.x,y:t.y};let s=r.startsWith("start")?t.arrowTypeStart:t.arrowTypeEnd;return M.calcTerminalLabelPosition(s?10:0,ne[r],n)}e(K,"terminalLabelTranslate");
|
|
2
|
-
export{la,ca,W,Fn,to,ua,cr};
|
package/web/chunk-sgwccs54.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,a}from"./chunk-1s53190z.js";import{K,Dt,Mt}from"./chunk-2b63adsj.js";import{G}from"./chunk-14deqqhr.js";import{sr,kt}from"./chunk-2cem4sv7.js";var i=sr().RailroadPeg.parser.LangiumParser,s=e((r)=>{let t=r.alternatives.map(l);if(t.length===1)return t[0];return{type:"choice",alternatives:t}},"transformOrderedChoice"),l=e((r)=>{let t=r.elements.map(m);if(t.length===1)return t[0];return{type:"sequence",elements:t}},"transformSequence"),m=e((r)=>{let t=p(r.suffix);if(!r.operator)return t;return{type:"special",text:r.operator==="&"?`&${o(t)}`:`!${o(t)}`}},"transformPrefix"),o=e((r)=>{switch(r.type){case"terminal":return`"${r.value}"`;case"nonterminal":return r.name;case"special":return r.text;default:return"(...)"}},"nodeToLabel"),p=e((r)=>{let t=u(r.primary);if(!r.operator)return t;switch(r.operator){case"?":return{type:"optional",element:t};case"*":return{type:"repetition",element:t,min:0,max:1/0};case"+":return{type:"repetition",element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${r.operator}`)}},"transformSuffix"),u=e((r)=>{switch(r.$type){case"PegLiteral":return{type:"terminal",value:r.value};case"PegIdentifier":return{type:"nonterminal",name:r.name};case"PegGroup":return s(r.element);case"PegAny":return{type:"special",text:r.dot};default:throw Error(`Unsupported PEG primary node: ${r.$type}`)}},"transformPrimary"),c=e((r)=>({name:r.name,definition:s(r.definition)}),"transformRule"),f=e((r)=>{if(G(r,K),r.title)K.setTitle(r.title);r.rules.map((t)=>K.addRule(c(t)))},"populateDb"),d={parse:e((r)=>{K.clear(),a.debug("[PEG Parser] Starting Langium parse");let t=i.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new kt(t);let n=t.value;a.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),a.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:K}},w={parser:d,db:K,renderer:Mt,styles:Dt};export{w as diagram};
|
package/web/chunk-sjh8gtm9.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{yn}from"./chunk-wjbk50hn.js";import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,O,B,C,S,E,T,A,R,L,V,Dn,nt,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var P=/[─━│┃└┗├┣]/,F=/[└┗├┣]/,ee=/[─━]/,H=/^[\s│┃]+$/,W=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,z=/^\s*%%/,te=" ";function Z(n){return n.some((r)=>P.test(r))}e(Z,"isBoxDrawingFormat");function q(n){for(let r of n){let t=F.exec(r);if(t?.index&&t.index>0)return t.index}return 4}e(q,"inferSegmentWidth");function j(n,r){return n.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{let c=parseInt(i,10),o=r.get(c);return o?`line ${o}`:t})}e(j,"remapErrorLines");function J(n){let r=n.split(`
|
|
2
|
-
`),t=new Map,i=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){i=g;break}if(i===-1)return{text:n,lineMap:t};let c=[];for(let g=i+1;g<r.length;g++){let d=r[g];if(d.trim()===""||z.test(d)||W.test(d))continue;if(H.test(d))continue;c.push(d.replace(/\t/g," "))}if(!Z(c))return{text:n,lineMap:t};let o=q(c),s=[],l=0;for(let g=0;g<=i;g++)s.push(r[g]),l++,t.set(l,g+1);for(let g=i+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){s.push(d),l++,t.set(l,f);continue}if(z.test(d)){s.push(d),l++,t.set(l,f);continue}if(W.test(d)){s.push(d),l++,t.set(l,f);continue}if(H.test(d))continue;let h=d.replace(/\t/g," "),w=F.exec(h);if(w?.index!==void 0){let u=w.index,x=Math.round(u/o)+1,m=u+1;while(m<h.length&&ee.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let I=h.slice(m).trimEnd();if(!I)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let Q=te.repeat(x);s.push(Q+I),l++,t.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(P.test(h))s.push(d),l++,t.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else s.push(d),l++,t.set(l,f)}return{text:s.join(`
|
|
3
|
-
`),lineMap:t}}e(J,"preprocessBoxDrawing");var v=new yn(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),re=e(()=>{v.reset(),C()},"clear"),ne=e(()=>v.records.stack[0],"getRoot"),ie=e(()=>v.records.cnt,"getCount"),oe=D.treeView,se=e(()=>U(oe,b().treeView),"getConfig"),ae=e((n,r,t,i,c,o)=>{while(n<=v.records.stack[v.records.stack.length-1].level)v.records.stack.pop();let s={id:v.records.cnt++,level:n,name:r,nodeType:t,icon:c,cssClass:i,description:o,children:[]};v.records.stack[v.records.stack.length-1].children.push(s),v.records.stack.push(s)},"addNode"),ce={clear:re,addNode:ae,getRoot:ne,getCount:ie,getConfig:se,getAccTitle:E,getAccDescription:A,getDiagramTitle:L,setAccDescription:T,setAccTitle:S,setDiagramTitle:R},k=ce,le=e((n)=>{G(n,k);for(let r of n.nodes){let t=typeof r.indent==="number"?r.indent:0,i=r.name,c=i.endsWith("/");if(c)i=i.slice(0,-1);let o=c?"directory":"file",s=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?O(d,b()):void 0;k.addNode(t,i,o,s,g,p)}},"populate"),de={parse:e(async(n)=>{let{text:r,lineMap:t}=J(n);try{let i=await X("treeView",r);a.debug(i),le(i)}catch(i){if(t.size>0&&i instanceof Error)i.message=j(i.message,t);throw i}},"parse")},y={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function K(n,r){let t=r?.filenameIcons?.[n];if(t)return t;let i=n.lastIndexOf(".");if(i>0){let c=n.substring(i).toLowerCase(),o=r?.extensionIcons;return o?.[c]??o?.[c.slice(1)]}return}e(K,"detectIcon");function N(n,r){if(n.includes(":"))return n;if(n in y.icons||!r)return`${y.prefix}:${n}`;return`${r}:${n}`}e(N,"qualifyIcon");function M(n,r){if(n.icon==="none")return;if(n.icon)return N(n.icon,r.defaultIconPack);if(!r.showIcons)return;if(n.nodeType==="file"){let t=K(n.name,r);if(t==="none")return;if(t)return N(t,r.defaultIconPack)}return`${y.prefix}:${n.nodeType==="directory"?"folder":"file"}`}e(M,"getNodeIcon");Dn([{name:y.prefix,icons:y}]);var _=14,he=4,pe=16,fe=e(async(n,r)=>{let t=[],i=e((o)=>{let s=M(o,r);if(s)t.push({icon:s,node:o});o.children.forEach(i)},"collect");i(n);let c=await Promise.all(t.map(async({icon:o,node:s})=>({id:s.id,svg:await nt(o,{height:_,width:_})})));return new Map(c.map(({id:o,svg:s})=>[o,s]))},"resolveNodeIcons"),ge=e((n,r,t,i,c,o)=>{let s=i.append("g"),l="treeView-node-label";if(t.nodeType==="directory")l+=" treeView-node-dir";if(t.cssClass)l+=` ${t.cssClass}`;let g=_+he,d=M(t,c),p=d!==void 0;if(d)s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+c.paddingX}, ${r+c.paddingY})`).html(o.get(t.id)??"");let f=s.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,x=n+c.paddingX+(p?g:0);f.attr("x",x),f.attr("y",r+u/2);let m=x+w,I=w+c.paddingX*2+(p?g:0);if(t.BBox={x:n,y:r,width:I,height:u},t.cssClass?.split(/\s+/).includes("highlight"))s.insert("rect",":first-child").attr("x",n).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:t,nodeGroup:s,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),Y=e((n,r,t,i,c,o)=>n.append("line").attr("x1",r).attr("y1",t).attr("x2",i).attr("y2",c).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),ue=e((n,r,t,i)=>{let c=0,o=0,s=[],l=e((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),x=ge(u,c,f,p,h,i);s.push(x);let{height:m,width:I}=f.BBox;Y(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),o=Math.max(o,u+I),c+=m},"drawNode"),g=e((p,f=0)=>{l(n,p,t,f),p.children.forEach((x)=>{g(x,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:x,height:m}=p.children[p.children.length-1].BBox;Y(n,h+t.paddingX,w+u,h+t.paddingX,x+m/2+t.lineThickness/2,t.lineThickness)}},"processNode");g(r);let d=s.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...s.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();o=Math.max(o,f+u.width+t.paddingX)}}for(let p of s)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=o-p.node.BBox.x+8;f.attr("width",h),o=Math.max(o,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:o}},"drawTree"),me=e(async(n,r,t,i)=>{a.debug(`Rendering treeView diagram
|
|
4
|
-
`+n);let c=i.db,o=c.getRoot(),s=c.getConfig(),l=V(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(o,s),{totalHeight:p,totalWidth:f}=ue(g,o,s,d);l.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${p}`),B(l,p,f,s.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=e(({treeView:n})=>{let{labelFontSize:r,labelColor:t,lineColor:i,iconColor:c,descriptionColor:o,highlightBg:s,highlightStroke:l}=U(ve,n);return`
|
|
5
|
-
.treeView-node-label {
|
|
6
|
-
font-size: ${r};
|
|
7
|
-
fill: ${t};
|
|
8
|
-
white-space: pre;
|
|
9
|
-
}
|
|
10
|
-
.treeView-node-dir {
|
|
11
|
-
font-weight: bold;
|
|
12
|
-
}
|
|
13
|
-
.treeView-node-line {
|
|
14
|
-
stroke: ${i};
|
|
15
|
-
}
|
|
16
|
-
.treeView-node-icon {
|
|
17
|
-
color: ${c};
|
|
18
|
-
}
|
|
19
|
-
.treeView-node-description {
|
|
20
|
-
font-size: ${r};
|
|
21
|
-
fill: ${o};
|
|
22
|
-
font-style: italic;
|
|
23
|
-
white-space: pre;
|
|
24
|
-
}
|
|
25
|
-
.treeView-highlight-bg {
|
|
26
|
-
fill: ${s};
|
|
27
|
-
stroke: ${l};
|
|
28
|
-
stroke-width: 1;
|
|
29
|
-
}
|
|
30
|
-
`},"styles"),Ce=be,Ee={db:k,renderer:xe,parser:de,styles:Ce};export{Ee as diagram};
|
package/web/chunk-t3658ehb.js
DELETED
package/web/chunk-t81p4wqc.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,ke,D,b,B,C,S,E,T,A,R,L,p,V,Hr,k,U}from"./chunk-1s53190z.js";import{Pt}from"./chunk-5nda24gv.js";import{X}from"./chunk-2cem4sv7.js";import{Xe}from"./chunk-07agqp8h.js";import{le}from"./chunk-989jq2h8.js";function je(t){var n=0,l=t.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;t.value=n}function ge(){return this.eachAfter(je)}function ye(t,n){let l=-1;for(let o of this)t.call(n,o,++l,this);return this}function xe(t,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(t.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(t,n){var l=this,o=[l],s=[],d,f,h,v=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())t.call(n,l,++v,this);return this}function ve(t,n){let l=-1;for(let o of this)if(t.call(n,o,++l,this))return o}function be(t){return this.eachAfter(function(n){var l=+t(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(t){return this.eachBefore(function(n){if(n.children)n.children.sort(t)})}function Ce(t){var n=this,l=Ze(n,t),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(t!==l)o.splice(s,0,t),t=t.parent;return o}function Ze(t,n){if(t===n)return t;var l=t.ancestors(),o=n.ancestors(),s=null;t=l.pop(),n=o.pop();while(t===n)s=t,t=l.pop(),n=o.pop();return s}function Te(){var t=this,n=[t];while(t=t.parent)n.push(t);return n}function Le(){return Array.from(this)}function $e(){var t=[];return this.eachBefore(function(n){if(!n.children)t.push(n)}),t}function Ae(){var t=this,n=[];return t.each(function(l){if(l!==t)n.push({source:l.parent,target:l})}),n}function*Fe(){var t=this,n,l=[t],o,s,d;do{n=l.reverse(),l=[];while(t=n.pop())if(yield t,o=t.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(t,n){if(t instanceof Map){if(t=[void 0,t],n===void 0)n=Ke}else if(n===void 0)n=Je;var l=new ce(t),o,s=[l],d,f,h,v;while(o=s.pop())if((f=n(o.data))&&(v=(f=Array.from(f)).length)){o.children=f;for(h=v-1;h>=0;--h)s.push(d=f[h]=new ce(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ue(){return re(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){if(t.data.value!==void 0)t.value=t.data.value;t.data=t.data.data}function et(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function ce(t){this.data=t,this.depth=this.height=0,this.parent=null}ce.prototype=re.prototype={constructor:ce,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ue,[Symbol.iterator]:Fe};function Be(t){if(typeof t!=="function")throw Error();return t}function ne(){return 0}function Q(t){return function(){return t}}function Ne(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Me(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(o-n)/t.value;while(++h<v)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(s-l)/t.value;while(++h<v)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(t,n,l,o,s,d){var f=[],h=n.children,v,u,m=0,_=0,i=h.length,M,F,N=n.value,g,w,Y,O,ee,se,j;while(m<i){M=s-l,F=d-o;do g=h[_++].value;while(!g&&_<i);w=Y=g,se=Math.max(F/M,M/F)/(N*t),j=g*g*se,ee=Math.max(Y/j,j/w);for(;_<i;++_){if(g+=u=h[_].value,u<w)w=u;if(u>Y)Y=u;if(j=g*g*se,O=Math.max(Y/j,j/w),O>ee){g-=u;break}ee=O}if(f.push(v={value:g,dice:M<F,children:h.slice(m,_)}),v.dice)Me(v,l,o,s,N?o+=F*g/N:d);else _e(v,l,o,N?l+=M*g/N:s,d);N-=g,m=_}return f}var Ee=function t(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return t((o=+o)>1?o:1)},l}(tt);function fe(){var t=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,v=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(_),s=[0],n)i.eachBefore(Ne);return i}function _(i){var M=s[i.depth],F=i.x0+M,N=i.y0+M,g=i.x1-M,w=i.y1-M;if(g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;if(i.x0=F,i.y0=N,i.x1=g,i.y1=w,i.children){if(M=s[i.depth+1]=d(i)/2,F+=u(i)-M,N+=f(i)-M,g-=h(i)-M,w-=v(i)-M,g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;t(i,F,N,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(t=Be(i),m):t},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:Q(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:Q(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:Q(+i),m):h},m.paddingBottom=function(i){return arguments.length?(v=typeof i==="function"?i:Q(+i),m):v},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:Q(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=D,n=b();return U({...t.treemap,...n.treemap??{}})}addNode(t,n){if(this.nodes.push(t),this.levels.set(t,n),n===0)this.outerNodes.push(t),this.root??=t}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,n){let l=this.classes.get(t)??{id:t,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Hr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(t,l)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(t){if(!t.length)return[];let n=[],l=[];return t.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}e(We,"buildHierarchy");var rt=e((t,n)=>{G(t,n);let l=[];for(let d of t.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of t.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,v=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,_={level:h,name:v,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(_)}let o=We(l),s=e((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=e((t)=>t.name?String(t.name):"","getItemName"),He={parser:{yy:void 0},parse:e(async(t)=>{try{let l=await X("treemap",t);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,oe=10,pe=25,ot=e((t,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),v=s.getRoot(),{themeVariables:u}=b();if(!v)return;let m=h?30:0,_=V(n),i=d.nodeWidth?d.nodeWidth*oe:960,M=d.nodeHeight?d.nodeHeight*oe:500,F=i,N=M+m;_.attr("viewBox",`0 0 ${F} ${N}`),B(_,N,F,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=e((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=e((z)=>"$"+Pt(","+y)(z),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=e((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Xe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),Y=Xe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Xe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)_.append("text").attr("x",F/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=_.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),se=re(v).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,M]).paddingTop((r)=>r.children&&r.children.length>0?pe+oe:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?oe:0).paddingRight((r)=>r.children&&r.children.length>0?oe:0).paddingBottom((r)=>r.children&&r.children.length>0?oe:0).round(!0)(se),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),ie=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",pe).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),ie.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",pe),ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>Y(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ie.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",pe/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let z=r.x1-r.x0,W=6,P;if(d.showValues!==!1&&r.value){let I=z-10,K=30,Ge=10;P=I-30-10-W}else P=z-W-6;let x=Math.max(15,P),J=c.node();if(J.getComputedTextLength()>x){let K=y;while(K.length>0){if(K=y.substring(0,K.length-1),K.length===0){if(c.text("..."),J.getComputedTextLength()>x)c.text("");break}if(c.text(K+"..."),J.getComputedTextLength()<=x)break}}}),d.showValues!==!1)ie.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",pe/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,de=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,ue=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ue.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),ue.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),ue.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,z=r.y1-r.y0,W=c.node(),P=y-2*he,Z=z-2*he;if(P<Ve||Z<Ve){c.style("display","none");return}let x=parseInt(c.style("font-size"),10),J=0.6;while(W.getComputedTextLength()>P&&x>te)x--,c.style("font-size",`${x}px`);let H=Math.max(ae,Math.min(de,Math.round(x*J))),I=x+me+H;while(I>Z&&x>te){if(x--,H=Math.max(ae,Math.min(de,Math.round(x*J))),H<ae&&x===te)break;if(c.style("font-size",`${x}px`),I=x+me+H,H<=ae&&I>Z);}if(c.style("font-size",`${x}px`),q){if(x<te||Z<te)c.style("display","none")}else if(W.getComputedTextLength()>P||x<te||Z<x)c.style("display","none")}),d.showValues!==!1)ue.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${de}px;fill:`+O(c.data.name)+";",z=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+z.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),z=this.parentNode;if(!z){y.style("display","none");return}let W=p(z).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let P=parseFloat(W.style("font-size")),x=Math.max(ae,Math.min(de,Math.round(P*0.6)));y.style("font-size",`${x}px`);let H=(c.y1-c.y0)/2+P/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Ye=I-2*he;if(y.node().getComputedTextLength()>Ye||H+x>Pe||x<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;le(_,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=e(function(t,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=e(({treemap:t}={})=>{let n=ke(),l=b(),o=U(n,l.themeVariables),s=U(ct,t),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
|
|
2
|
-
.treemapNode.section {
|
|
3
|
-
stroke: ${s.sectionStrokeColor};
|
|
4
|
-
stroke-width: ${s.sectionStrokeWidth};
|
|
5
|
-
fill: ${s.sectionFillColor};
|
|
6
|
-
}
|
|
7
|
-
.treemapNode.leaf {
|
|
8
|
-
stroke: ${s.leafStrokeColor};
|
|
9
|
-
stroke-width: ${s.leafStrokeWidth};
|
|
10
|
-
fill: ${s.leafFillColor};
|
|
11
|
-
}
|
|
12
|
-
.treemapLabel {
|
|
13
|
-
fill: ${f};
|
|
14
|
-
font-size: ${s.labelFontSize};
|
|
15
|
-
}
|
|
16
|
-
.treemapValue {
|
|
17
|
-
fill: ${h};
|
|
18
|
-
font-size: ${s.valueFontSize};
|
|
19
|
-
}
|
|
20
|
-
.treemapTitle {
|
|
21
|
-
fill: ${d};
|
|
22
|
-
font-size: ${s.titleFontSize};
|
|
23
|
-
}
|
|
24
|
-
`},"getStyles"),dt=pt,fa={parser:He,get db(){return new Re},renderer:it,styles:dt};export{fa as diagram};
|
package/web/chunk-tewmsd7t.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-1s53190z.js";var c=1;function i(){if(typeof globalThis>"u")return;return globalThis}e(i,"getCaptureGlobal");function p(){return Boolean(i()?.mermaidCaptureSizes)}e(p,"shouldCaptureSizes");function u(){if(typeof location>"u")return"browser-dev";return`${location.pathname}${location.search}`}e(u,"capturedFromLocation");function d(n,r){let o=i();if(!o)return;let t=r.node(),s=((t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t)?.id??"(unknown)";o.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};o.mermaidCapturedSizes.push(a),o.mermaidLastCapturedSizes=a}e(d,"emitCapturedSizes");function m(n,r){let o=[];for(let t of r.nodes){if(t.isGroup)continue;o.push({id:t.id,width:t.width??0,height:t.height??0})}if(o.length===0)return;d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:o},n)}e(m,"captureNodeSizes");export{m as captureNodeSizes};
|
package/web/chunk-tf57s7ry.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{or}from"./chunk-2cem4sv7.js";export{or as createRailroadAbnfServices};
|
package/web/chunk-thbqwq6b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ii}from"./chunk-sf101c23.js";export{ii as default};
|
package/web/chunk-tqr80b5w.js
DELETED
package/web/chunk-tz4twwmw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Rt}from"./chunk-rddft5ce.js";var Z={};Rt(Z,{default:()=>St});var Q={};Rt(Q,{default:()=>Yt});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),xe=qr;var $r=xe.Symbol,Oe=$r;var Tt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Tt,G=Oe?Oe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(i){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var wt=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Pt=Qr;var Vr="[object Null]",to="[object Undefined]",Et=Oe?Oe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return Et&&Et in Object(t)?wt(t):Pt(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Ee=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Ee(t)&&Qe(t)==oo}var dt=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var Gt=fo;var io=Array.isArray,H=io;var no=1/0,It=Oe?Oe.prototype:void 0,Lt=It?It.toString:void 0;function jt(t){if(typeof t=="string")return t;if(H(t))return Gt(t,jt)+"";if(dt(t))return Lt?Lt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Mt=jt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var me=so;function po(t){return t}var it=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!me(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Ht=ho;var co=xe["__core-js_shared__"],k=co;var Nt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Nt&&Nt in t}var Dt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!me(t)||Dt(t))return!1;var e=Ht(t)?Po:Oo;return e.test(_(t))}var Bt=Co;function Eo(t,e){return t==null?void 0:t[e]}var Ut=Eo;function Io(t,e){var r=Ut(t,e);return Bt(r)?r:void 0}var h=Io;var Lo=h(xe,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var zt=jo;function Mo(){}var Wt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var qt=Fo;function Bo(t){return function(){return t}}var ot=Bo;var Go=function(){try{var t=h(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),ur=Go;var Uo=!ur?it:function(t,e){return ur(t,"toString",{configurable:!0,enumerable:!1,value:ot(e),writable:!0})},$t=Uo;var zo=qt($t),da=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var pa=Wo;function Ko(t,e,r,o){var a=t.length,i=r+(o?1:-1);while(o?i--:++i<a)if(e(t[i],i,t))return i;return-1}var ma=Ko;function Ho(t){return t!==t}var kt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):ma(t,kt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(t,e,0)>-1}var Vt=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var bn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var Ct=Jo;var ee=Math.max;function Qo(t,e,r){return e=ee(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,i=ee(o.length-e,0),n=Array(i);while(++a<i)n[a]=o[e+a];a=-1;var s=Array(e+1);while(++a<e)s[a]=o[a];return s[e]=r(n),zt(t,this,s)}}var fa=Qo;function Vo(t,e){return da(fa(t,e,it),t+"")}var xn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Ht(t)}var $e=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var _n=aa;function ia(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var re=ia;var na="[object Arguments]";function sa(t){return Ee(t)&&Qe(t)==na}var ct=sa;var oe=Object.prototype,{hasOwnProperty:ua,propertyIsEnumerable:la}=oe,ca=ct(function(){return arguments}())?ct:function(t){return Ee(t)&&ua.call(t,"callee")&&!la.call(t,"callee")},Ft=ca;function Oa(){return!1}var ae=Oa;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,Aa=fe&&fe.exports===ne,ie=Aa?xe.Buffer:void 0,Ta=ie?ie.isBuffer:void 0,Sa=Ta||ae,St=Sa;var Pa="[object Arguments]",Ca="[object Array]",Ea="[object Boolean]",Ia="[object Date]",La="[object Error]",ja="[object Function]",Ma="[object Map]",Na="[object Number]",Da="[object Object]",Ra="[object RegExp]",Fa="[object Set]",Ba="[object String]",Ga="[object WeakMap]",Ua="[object ArrayBuffer]",za="[object DataView]",Wa="[object Float32Array]",Ka="[object Float64Array]",Ha="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Wa]=m[Ka]=m[Ha]=m[qa]=m[$a]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Pa]=m[Ca]=m[Ua]=m[Ea]=m[za]=m[Ia]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=!1;function Qa(t){return Ee(t)&&j(t.length)&&!!m[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var wn=Va;var pe=typeof Q=="object"&&Q&&!Q.nodeType&&Q,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,gt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return gt&>.binding&>.binding("util")}catch(e){}}(),Yt=ef;var ue=Yt&&Yt.isTypedArray,rf=ue?wn(ue):se,kn=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&Ft(t),a=!r&&!o&&St(t),i=!r&&!o&&!a&&kn(t),n=r||o||a||i,s=n?re(t.length,String):[],p=s.length;for(var u in t)if((e||af.call(t,u))&&!(n&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bn(u,p))))s.push(u);return s}var ha=ff;function nf(t,e){return function(r){return t(e(r))}}var ga=nf;var sf=ga(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!_n(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var dr=mf;function lf(t){return $e(t)?ha(t):dr(t)}var _e=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||dt(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=h(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var yt=N;function Cf(){this.__data__=[],this.size=0}var be=Cf;function Ef(t,e){var r=t.length;while(r--)if(Ct(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var ve=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var Ae=Mf;function Nf(t){return O(this.__data__,t)>-1}var Te=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Se=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=be;D.prototype.delete=ve;D.prototype.get=Ae;D.prototype.has=Te;D.prototype.set=Se;var A=D;var Rf=h(xe,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new yt,map:new(T||A),string:new yt}}var Pe=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ce=Bf;function Gf(t,e){var r=t.__data__;return Ce(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Ie=Uf;function zf(t){return w(this,t).get(t)}var Le=zf;function Wf(t){return w(this,t).has(t)}var je=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Me=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Pe;R.prototype.delete=Ie;R.prototype.get=Le;R.prototype.has=je;R.prototype.set=Me;var E=R;var Hf="Expected a function";function _t(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],i=r.cache;if(i.has(a))return i.get(a);var n=t.apply(this,o);return r.cache=i.set(a,n)||i,n};return r.cache=new(_t.Cache||E),r}_t.Cache=E;var Ne=_t;var qf=500;function $f(t){var e=Ne(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var De=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=De(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,i){e.push(a?i.replace(Yf,"$1"):o||r)}),e}),Re=Xf;function Zf(t){return t==null?"":Mt(t)}var ya=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Re(ya(t))}var Cn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||dt(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Zt=Vf;function ti(t,e){e=Cn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Zt(e[r++])];return r&&r==o?t:void 0}var Sn=ti;function ei(t,e,r){var o=t==null?void 0:Sn(t,e);return o===void 0?r:o}var Fe=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var pr=ri;var Be=Oe?Oe.isConcatSpreadable:void 0;function oi(t){return H(t)||Ft(t)||!!(Be&&t&&t[Be])}var Ue=oi;function ze(t,e,r,o,a){var i=-1,n=t.length;r||(r=Ue),a||(a=[]);while(++i<n){var s=t[i];if(e>0&&r(s))if(e>1)ze(s,e-1,r,o,a);else pr(a,s);else if(!o)a[a.length]=s}return a}var mr=ze;function ai(t,e,r,o){var a=-1,i=t==null?0:t.length;if(o&&i)r=t[++a];while(++a<i)r=e(r,t[a],a,t);return r}var We=ai;function fi(){this.__data__=new A,this.size=0}var Ke=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var He=ii;function ni(t){return this.__data__.get(t)}var qe=ni;function si(t){return this.__data__.has(t)}var ke=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Ye=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=Ke;F.prototype.delete=He;F.prototype.get=qe;F.prototype.has=ke;F.prototype.set=Ye;var Xt=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,i=[];while(++r<o){var n=t[r];if(e(n,r,t))i[a++]=n}return i}var V=mi;function li(){return[]}var va=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?va:function(t){if(t==null)return[];return t=Object(t),V(Xe(t),function(e){return xi.call(t,e)})},fr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:pr(o,r(t))}var ba=ci;function gi(t){return ba(t,_e,fr)}var Ur=gi;var yi=h(xe,"DataView"),tt=yi;var _i=h(xe,"Promise"),et=_i;var bi=h(xe,"Set"),S=bi;var Ze="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(tt),Ai=_(T),Ti=_(et),wi=_(S),Si=_(Y),I=Qe;if(tt&&I(new tt(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Ze||et&&I(et.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Qe(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Ze;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var pt=I;var Pi=xe.Uint8Array,hr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function rt(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}rt.prototype.add=rt.prototype.push=or;rt.prototype.has=ar;var at=rt;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var ft=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,i){var n=r&Mi,s=t.length,p=e.length;if(s!=p&&!(n&&p>s))return!1;var u=i.get(t),x=i.get(e);if(u&&x)return u==e&&x==t;var d=-1,l=!0,y=r&Ni?new at:void 0;i.set(t,e),i.set(e,t);while(++d<s){var c=t[d],g=e[d];if(o)var v=n?o(g,c,d,e,t,i):o(c,g,d,t,e,i);if(v!==void 0){if(v)continue;l=!1;break}if(y){if(!ir(e,function(P,C){if(!ft(y,C)&&(c===P||a(c,P,r,o,i)))return y.push(C)})){l=!1;break}}else if(!(c===g||a(c,g,r,o,i))){l=!1;break}}return i.delete(t),i.delete(e),l}var nt=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",sr=Oe?Oe.prototype:void 0,bt=sr?sr.valueOf:void 0;function Ji(t,e,r,o,a,i,n){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!i(new hr(t),new hr(e)))return!1;return!0;case Ui:case zi:case Hi:return Ct(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var s=nr;case $i:var p=o&Bi;if(s||(s=B),t.size!=e.size&&!p)return!1;var u=n.get(t);if(u)return u==e;o|=Gi,n.set(t,e);var x=nt(s(t),s(e),o,a,i,n);return n.delete(t),x;case Yi:if(bt)return bt.call(t)==bt.call(e)}return!1}var lr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,i){var n=r&Qi,s=Ur(t),p=s.length,u=Ur(e),x=u.length;if(p!=x&&!n)return!1;var d=p;while(d--){var l=s[d];if(!(n?l in e:tn.call(e,l)))return!1}var y=i.get(t),c=i.get(e);if(y&&c)return y==e&&c==t;var g=!0;i.set(t,e),i.set(e,t);var v=n;while(++d<p){l=s[d];var P=t[l],C=e[l];if(o)var At=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(At===void 0?P===C||a(P,C,r,o,i):At)){g=!1;break}v||(v=l=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return i.delete(t),i.delete(e),g}var xr=en;var rn=1,cr="[object Arguments]",_r="[object Array]",st="[object Object]",on=Object.prototype,br=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?_r:pt(t),u=s?_r:pt(e);p=p==cr?st:p,u=u==cr?st:u;var x=p==st,d=u==st,l=p==u;if(l&&St(t)){if(!St(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Xt),n||kn(t)?nt(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&br.call(t,"__wrapped__"),c=d&&br.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Xt),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Xt),xr(t,e,r,o,a,i)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Ee(t)&&!Ee(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var ut=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,i=a,n=!o;if(t==null)return!i;t=Object(t);while(a--){var s=r[a];if(n&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}while(++a<i){s=r[a];var p=s[0],u=t[p],x=s[1];if(n&&s[2]){if(u===void 0&&!(p in t))return!1}else{var d=new Xt;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?ut(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var lt=pn;function un(t){var e=_e(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function hn(t,e,r){e=Cn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Zt(e[o]);if(!(i=t!=null&&r(t,n)))break;t=t[n]}if(i||++o!=a)return i;return a=t==null?0:t.length,!!a&&j(a)&&bn(n,a)&&(H(t)||Ft(t))}var xa=hn;function cn(t,e){return t!=null&&xa(t,e,Pr)}var _a=cn;var gn=1,yn=2;function vn(t,e){if(M(t)&<(e))return xt(Zt(t),e);return function(r){var o=Fe(r,t);return o===void 0&&o===e?_a(r,t):ut(e,o,gn|yn)}}var Cr=vn;function On(t){return function(e){return e==null?void 0:e[t]}}var wa=On;function An(t){return function(e){return Sn(e,t)}}var Er=An;function Pn(t){return M(t)?wa(Zt(t)):Er(t)}var Ir=Pn;function En(t){if(typeof t=="function")return t;if(t==null)return it;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var Ge=En;function In(t){return function(e,r,o){var a=-1,i=Object(e),n=o(e),s=n.length;while(s--){var p=n[t?s:++a];if(r(i[p],p,i)===!1)break}return e}}var Lr=In;var Ln=Lr(),gr=Ln;function jn(t,e){return t&&gr(t,e,_e)}var yr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!$e(r))return t(r,o);var a=r.length,i=e?a:-1,n=Object(r);while(e?i--:++i<a)if(o(n[i],i,n)===!1)break;return r}}var jr=Mn;var Nn=jr(yr),Tn=Nn;function Dn(t){return Ee(t)&&$e(t)}var ka=Dn;function Rn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Mr=Rn;function Fn(t){return typeof t=="function"?t:it}var vr=Fn;function Bn(t,e){var r=H(t)?pa:Tn;return r(t,vr(e))}var f=Bn;function Gn(t,e){var r=[];return Tn(t,function(o,a,i){if(e(o,a,i))r.push(o)}),r}var Nr=Gn;function Un(t,e){var r=H(t)?V:Nr;return r(t,Ge(e,3))}var Je=Un;function zn(t,e){return Gt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,_e(t))}var mt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if($e(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||St(t)||kn(t)||Ft(t)))return!t.length;var e=pt(t);if(e==Kn||e==Hn)return!t.size;if(_n(t))return!dr(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var we=Xn;function Zn(t,e,r,o,a){return a(t,function(i,n,s){r=o?(o=!1,i):e(r,i,n,s)}),r}var Rr=Zn;function Jn(t,e,r){var o=H(t)?We:Rr,a=arguments.length<3;return o(t,Ge(e,4),r,a,Tn)}var Kt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?Wt:function(t){return new S(t)},Fr=Vn;var ts=200;function es(t,e,r){var o=-1,a=Vt,i=t.length,n=!0,s=[],p=s;if(r)n=!1,a=Mr;else if(i>=ts){var u=e?null:Fr(t);if(u)return B(u);n=!1,a=ft,p=new at}else p=e?[]:s;t:while(++o<i){var x=t[o],d=e?e(x):x;if(x=r||x!==0?x:0,n&&d===d){var l=p.length;while(l--)if(p[l]===d)continue t;if(e)p.push(d);s.push(x)}else if(!a(p,d,r)){if(p!==s)p.push(d);s.push(x)}}return s}var Br=es;var rs=xn(function(t){return Br(mr(t,1,ka,!0))}),vt=rs;var as="\x00",L="\x00",Gr="\x01";class te{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ot(void 0),this._defaultEdgeLabelFn=ot(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Ht(t))t=ot(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return _e(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return f(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],f(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];f(_e(this._in[t]),e),delete this._in[t],delete this._preds[t],f(_e(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(we(e))e=L;else{e+="";for(var r=e;!we(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(we(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return _e(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return _e(e)}successors(t){var e=this._sucs[t];if(e)return _e(e)}neighbors(t){var e=this.predecessors(t);if(e)return vt(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;f(this._nodes,function(i,n){if(t(n))e.setNode(n,i)}),f(this._edgeObjs,function(i){if(e.hasNode(i.v)&&e.hasNode(i.w))e.setEdge(i,r.edge(i))});var o={};function a(i){var n=r.parent(i);if(n===void 0||e.hasNode(n))return o[i]=n,n;else if(n in o)return o[n];else return a(n)}if(this._isCompound)f(e.nodes(),function(i){e.setParent(i,a(i))});return e}setDefaultEdgeLabel(t){if(!Ht(t))t=ot(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return mt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Kt(t,function(a,i){if(o.length>1)r.setEdge(a,i,e);else r.setEdge(a,i);return i}),this}setEdge(){var t,e,r,o,a=!1,i=arguments[0];if(typeof i==="object"&&i!==null&&"v"in i){if(t=i.v,e=i.w,r=i.name,arguments.length===2)o=arguments[1],a=!0}else if(t=i,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!we(r))r=""+r;var n=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n)){if(a)this._edgeLabels[n]=o;return this}if(!we(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=a?o:this._defaultEdgeLabelFn(t,e,r);var s=fs(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[n]=s,zr(this._preds[e],t),zr(this._sucs[t],e),this._in[e][n]=s,this._out[t][n]=s,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=mt(r);if(!e)return o;return Je(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=mt(r);if(!e)return o;return Je(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}te.prototype._nodeCount=0;te.prototype._edgeCount=0;function zr(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+Gr+i+Gr+(we(o)?as:o)}function fs(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var s={v:a,w:i};if(o)s.name=o;return s}function Ot(t,e){return z(t,e.v,e.w,e.name)}
|
|
2
|
-
export{xe,Oe,Qe,Ee,dt,Gt,H,me,it,Ht,ot,ur,da,pa,ma,bn,Ct,fa,xn,$e,_n,Ft,St,wn,Yt,kn,ha,ga,dr,_e,ya,Cn,Zt,Sn,pr,mr,Xt,va,fr,ba,Ur,pt,hr,xa,_a,wa,Ge,gr,yr,Tn,ka,vr,f,Je,mt,we,Kt,te};
|
package/web/chunk-v282r683.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,B,C,S,E,T,A,R,L,V,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var N=D.packet,F=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"PacketDB")}getConfig(){let t=U({...N,...b().packet});if(t.showBits)t.paddingY+=10;return t}getPacket(){return this.packet}pushWord(t){if(t.length>0)this.packet.push(t)}clear(){C(),this.packet=[]}},M=1e4,Y=e((t,r)=>{G(t,r);let i=-1,s=[],l=1,{bitsPerRow:d}=r.getConfig();for(let{start:o,end:n,bits:g,label:f}of t.blocks){if(o!==void 0&&n!==void 0&&n<o)throw Error(`Packet block ${o} - ${n} is invalid. End must be greater than start.`);if(o??=i+1,o!==i+1)throw Error(`Packet block ${o} - ${n??o} is not contiguous. It should start from ${i+1}.`);if(g===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);n??=o+(g??1)-1,g??=n-o+1,i=n,a.debug(`Packet block ${o} - ${i} with label ${f}`);while(s.length<=d+1&&r.getPacket().length<M){let[p,h]=I({start:o,end:n,bits:g,label:f},l,d);if(s.push(p),p.end+1===l*d)r.pushWord(s),s=[],l++;if(!h)break;({start:o,end:n,bits:g,label:f}=h)}}r.pushWord(s)},"populate"),I=e((t,r,i)=>{if(t.start===void 0)throw Error("start should have been set during first phase");if(t.end===void 0)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=r*i)return[t,void 0];let s=r*i-1,l=r*i;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:l,end:t.end,label:t.label,bits:t.end-l}]},"getNextFittingBlock"),P={parser:{yy:void 0},parse:e(async(t)=>{let r=await X("packet",t),i=P.parser?.yy;if(!(i instanceof F))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.debug(r),Y(r,i)},"parse")},O=e((t,r,i,s)=>{let l=s.db,d=l.getConfig(),{rowHeight:o,paddingY:n,bitWidth:g,bitsPerRow:f}=d,p=l.getPacket(),h=l.getDiagramTitle(),w=o+n,c=w*(p.length+1)-(h?0:o),k=g*f+2,m=V(r);m.attr("viewBox",`0 0 ${k} ${c}`),B(m,c,k,d.useMaxWidth);for(let[y,u]of p.entries())j(m,u,y,d);m.append("text").text(h).attr("x",k/2).attr("y",c-w/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=e((t,r,i,{rowHeight:s,paddingX:l,paddingY:d,bitWidth:o,bitsPerRow:n,showBits:g,bitOrder:f})=>{let p=t.append("g"),h=i*(s+d)+d,w=f==="descending";for(let c of r){let k=c.end-c.start+1,m=c.start%n,u=(w?n-m-k:m)*o+1,v=k*o-l;if(p.append("rect").attr("x",u).attr("y",h).attr("width",v).attr("height",s).attr("class","packetBlock"),p.append("text").attr("x",u+v/2).attr("y",h+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),!g)continue;let[W,_]=w?[c.end,c.start]:[c.start,c.end],x=k===1,z=h-2;if(p.append("text").attr("x",u+(x?v/2:0)).attr("y",z).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",x?"middle":"start").text(W),!x)p.append("text").attr("x",u+v).attr("y",z).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(_)}},"drawWord"),H={draw:O},K={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=e(({packet:t}={})=>{let r=U(K,t);return`
|
|
2
|
-
.packetByte {
|
|
3
|
-
font-size: ${r.byteFontSize};
|
|
4
|
-
}
|
|
5
|
-
.packetByte.start {
|
|
6
|
-
fill: ${r.startByteColor};
|
|
7
|
-
}
|
|
8
|
-
.packetByte.end {
|
|
9
|
-
fill: ${r.endByteColor};
|
|
10
|
-
}
|
|
11
|
-
.packetLabel {
|
|
12
|
-
fill: ${r.labelColor};
|
|
13
|
-
font-size: ${r.labelFontSize};
|
|
14
|
-
}
|
|
15
|
-
.packetTitle {
|
|
16
|
-
fill: ${r.titleColor};
|
|
17
|
-
font-size: ${r.titleFontSize};
|
|
18
|
-
}
|
|
19
|
-
.packetBlock {
|
|
20
|
-
stroke: ${r.blockStrokeColor};
|
|
21
|
-
stroke-width: ${r.blockStrokeWidth};
|
|
22
|
-
fill: ${r.blockFillColor};
|
|
23
|
-
}
|
|
24
|
-
`},"styles"),ot={parser:P,get db(){return new F},renderer:H,styles:q};export{ot as diagram};
|
package/web/chunk-v4vjjtn7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Si}from"./chunk-2cem4sv7.js";export{Si as createTreeViewServices};
|
package/web/chunk-vbwdwcdp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-1s53190z.js";import"./chunk-5vjhvw1m.js";import{Co}from"./chunk-femhej5w.js";import"./chunk-dg3p8db5.js";import"./chunk-tqr80b5w.js";import"./chunk-r7frwjqx.js";import"./chunk-989jq2h8.js";export{Co as diagram};
|
package/web/chunk-vjngfh0q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,g,t,n,_,s,Z,ae,j,lt}from"./chunk-rddft5ce.js";var I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],h=s("circle-slash",I);function R(o){let{Button:N,Panel:y,style:k}=_(),e=o.payload,[i,c]=r(!1),[b,C]=r(!1),[l,p]=r();if(!e)return null;let a=b?"killed":e.state,m=a==="running",d=a==="exited"&&e.code===0,u=a==="killed"||a==="timeout",f=e.output?.trim(),P=async()=>{if(i)return;c(!0),p(void 0);try{await o.connection.request(`/api/sessions/${encodeURIComponent(o.sessionID)}/jobs/${encodeURIComponent(e.id)}/kill`,{method:"POST"}),C(!0)}catch(x){p(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{c(!1)}};return n(y,{className:"my-2",header:n(g,{children:[t(lt,{className:"size-3.5 shrink-0 text-faint"}),t("span",{className:"truncate font-mono text-ink/90",title:e.command??e.id,children:e.command??`任务 ${e.id}`})]}),actions:n(g,{children:[m&&n(g,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[t(ae,{className:"size-3.5 animate-spin"}),t("span",{children:"后台运行中"})]}),t(N,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:i,onClick:()=>{P()},children:"停止"})]}),d&&n("span",{className:"flex items-center gap-1 text-success",children:[t(j,{className:"size-3.5"}),t("span",{children:"已完成"})]}),u&&n("span",{className:"flex items-center gap-1 text-faint",children:[t(h,{className:"size-3.5"}),t("span",{children:a==="timeout"?"已超时":"已停止"})]}),!m&&!d&&!u&&n("span",{className:"flex items-center gap-1 text-danger",children:[t(Z,{className:"size-3.5"}),n("span",{children:["退出码 ",e.code??"异常"]})]})]}),children:[l&&t("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:l}),f&&t("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:f})]})}export{R as BashJobCard};
|
package/web/chunk-vnt34mkb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Kn}from"./chunk-h6k1x096.js";export{Kn as default};
|
package/web/chunk-wbgkwxrc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,o,i,r,t,n,_,Z,ee,at,bt}from"./chunk-rddft5ce.js";import{vn}from"./chunk-t3658ehb.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]=r({}),[a,g]=r({}),[l,y]=r(null),[u,A]=r(!0),[k,z]=r(!1),[d,R]=r(!1),[f,c]=r(null),P=i(null),q=(a.executable??"")!==(b.executable??"")||Boolean(a.noSandbox)!==Boolean(b.noSandbox)||Boolean(a.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(a)}),!s.signal.aborted)B(a),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(ee,{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:a.executable??"",placeholder:"留空自动探测系统浏览器",onChange:(e)=>{g({...a,executable:e.target.value}),c(null)}}),a.executable&&t(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:()=>{g({...a,executable:""}),c(null)},className:"shrink-0",children:"清空"})]})}),t(v,{title:"禁用沙箱 (--no-sandbox)",description:"容器或 root 环境使用",children:t(C,{label:"禁用沙箱",disabled:u||d,checked:a.noSandbox??!1,onCheckedChange:(e)=>{g({...a,noSandbox:e}),c(null)}})}),t(v,{title:"忽略证书错误 (--ignore-certificate-errors)",description:"跳过自签名与证书有效性检查",children:t(C,{label:"忽略证书错误",disabled:u||d,checked:a.ignoreCertErrors??!1,onCheckedChange:(e)=>{g({...a,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(vn,{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(at,{className:"mr-1.5 size-3.5"}),"重置"]}),n(m,{type:"submit",variant:"primary",size:"sm",disabled:u||d,children:[t(bt,{className:"mr-1.5 size-3.5"}),d?"保存中…":"保存"]}),S&&t(m,{type:"button",variant:"secondary",size:"sm",onClick:S,children:"关闭"})]})]})]})]})}export{L as default};
|
package/web/chunk-wjbk50hn.js
DELETED
package/web/chunk-wjy848e2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ki}from"./chunk-2cem4sv7.js";export{ki as createPacketServices};
|
package/web/chunk-wvfmmw1v.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-1s53190z.js";import"./chunk-5vjhvw1m.js";import{Ai,Li}from"./chunk-femhej5w.js";import"./chunk-dg3p8db5.js";import"./chunk-tqr80b5w.js";import"./chunk-r7frwjqx.js";import"./chunk-989jq2h8.js";var r=e((t)=>`${Ai(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=Li({styles:o});export{D as diagram};
|
package/web/chunk-x1jm4zsg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bi}from"./chunk-2cem4sv7.js";export{bi as createWardleyServices};
|