isorite 0.12.0 → 0.13.0
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 +6 -5
- package/dist/main.js +5688 -8903
- package/docs/setup-for-agents.md +44 -102
- package/docs/setup.md +23 -87
- package/docs/terminal.md +54 -55
- package/guide/AGENTS.md +4 -0
- package/guide/atlas/find-what-it-rests-on.md +9 -0
- package/guide/atlas/the-atlas.md +21 -0
- package/guide/atlas/the-switches/satellites.svg +17 -0
- package/guide/atlas/the-switches.md +27 -0
- package/guide/iso/agents-md.md +13 -0
- package/guide/iso/artifacts/the-guide.csv +8 -0
- package/guide/iso/artifacts/the-guide.html +35 -0
- package/guide/iso/artifacts.md +15 -0
- package/guide/iso/ask-iso.md +7 -0
- package/guide/iso/give-it-notes.md +9 -0
- package/guide/iso/in-hand.md +18 -0
- package/guide/iso/iso-writes-marked.md +15 -0
- package/guide/iso/iso.md +17 -0
- package/guide/iso/let-it-write.md +11 -0
- package/guide/iso/write-agents-md.md +11 -0
- package/guide/notes/a-note-is-markdown.md +17 -0
- package/guide/notes/a-notes-details.md +23 -0
- package/guide/notes/diagrams-and-code.md +43 -0
- package/guide/notes/every-change-is-kept.md +14 -0
- package/guide/notes/folders.md +11 -0
- package/guide/notes/go-back-a-version.md +9 -0
- package/guide/notes/link-your-notes.md +9 -0
- package/guide/notes/links-and-their-kinds.md +23 -0
- package/guide/notes/make-move-delete.md +9 -0
- package/guide/notes/write-in-your-notes.md +9 -0
- package/guide/out-of-the-base/web-and-code-links.md +13 -0
- package/guide/questions-and-problems/ask-a-question.md +9 -0
- package/guide/questions-and-problems/how-iso-reads-you.md +9 -0
- package/guide/questions-and-problems/problems.md +15 -0
- package/guide/questions-and-problems/questions.md +27 -0
- package/guide/questions-and-problems/resolve-a-question.md +9 -0
- package/guide/questions-and-problems/why-markdown-links.md +7 -0
- package/guide/solve-this-one.md +11 -0
- package/guide/start-here.md +39 -0
- package/guide/terminal/let-the-agent-remember.md +9 -0
- package/guide/terminal/memory.md +13 -0
- package/guide/terminal/your-own-agent.md +24 -0
- package/guide/your-notes.md +6 -0
- package/guide/your-own-base/keeping-a-base-well.md +16 -0
- package/guide/your-own-base/starting-a-base.md +21 -0
- package/package.json +4 -7
- package/web/_app/immutable/assets/0.BEjn1Bfl.css +1 -0
- package/web/_app/immutable/assets/4.fOHsAKBF.css +1 -0
- package/web/_app/immutable/assets/drawn.D6lJzDcc.css +1 -0
- package/web/_app/immutable/chunks/{BK6pLgdi.js → 3fCuxe18.js} +1 -1
- package/web/_app/immutable/chunks/{D5XlJBy8.js → B-DzK7Gb.js} +1 -1
- package/web/_app/immutable/chunks/{BuUzVkG2.js → B35sQTcK.js} +1 -1
- package/web/_app/immutable/chunks/{D4YEq54N.js → B6uHgLdT.js} +1 -1
- package/web/_app/immutable/chunks/{Dh1lBxfx.js → BA78_vo5.js} +1 -1
- package/web/_app/immutable/chunks/{tUSDgbpy.js → BCGaqnao.js} +1 -1
- package/web/_app/immutable/chunks/BCyLp7pS.js +1 -0
- package/web/_app/immutable/chunks/{EMo1IeTW.js → BK31dpt6.js} +1 -1
- package/web/_app/immutable/chunks/BOxykeIc.js +1 -0
- package/web/_app/immutable/chunks/{DlXrOzlh.js → BT_btfh0.js} +1 -1
- package/web/_app/immutable/chunks/{Xm0YTnxV.js → BWE_HS0c.js} +1 -1
- package/web/_app/immutable/chunks/{BLmF1B2i.js → BXBhaEho.js} +1 -1
- package/web/_app/immutable/chunks/{BAclEN0O.js → Bb_N98K9.js} +1 -1
- package/web/_app/immutable/chunks/{gPtCGHiy.js → Bd-WxALw.js} +1 -1
- package/web/_app/immutable/chunks/{BA8Hpxhg.js → BhEqJU15.js} +1 -1
- package/web/_app/immutable/chunks/{DkxkvOjx.js → BiATTH-R.js} +1 -1
- package/web/_app/immutable/chunks/{D5vocsTl.js → Bj-5n5Pb.js} +1 -1
- package/web/_app/immutable/chunks/{DRX-TQzj.js → BqipEJXw.js} +1 -1
- package/web/_app/immutable/chunks/{CiMp12cC.js → Bt-fHApV.js} +1 -1
- package/web/_app/immutable/chunks/{DXTK-eyo.js → BvPxdlBc.js} +1 -1
- package/web/_app/immutable/chunks/{DfCZPwp1.js → C2npZzkn.js} +1 -1
- package/web/_app/immutable/chunks/{DF89zyH-.js → C5Z-Y7Lu.js} +1 -1
- package/web/_app/immutable/chunks/{CD6xPodA.js → C8h1oeAZ.js} +1 -1
- package/web/_app/immutable/chunks/{DDCg82xL.js → C8nK3Jvr.js} +1 -1
- package/web/_app/immutable/chunks/{CFEI5lV9.js → CAlIuau0.js} +1 -1
- package/web/_app/immutable/chunks/{9z49435t.js → CFf_dAzX.js} +1 -1
- package/web/_app/immutable/chunks/{D3-rqfsM.js → CMIt1Ma8.js} +1 -1
- package/web/_app/immutable/chunks/{-2Meesge.js → CMikI1NP.js} +3 -3
- package/web/_app/immutable/chunks/{Czz9qOh8.js → CT4_O9X_.js} +1 -1
- package/web/_app/immutable/chunks/{DX4bJJO0.js → CTDYUZPz.js} +1 -1
- package/web/_app/immutable/chunks/{By4S_gy5.js → CdY1G_wk.js} +1 -1
- package/web/_app/immutable/chunks/Cd_SqIWq.js +523 -0
- package/web/_app/immutable/chunks/{DBC2xjOo.js → CdmC_l9F.js} +1 -1
- package/web/_app/immutable/chunks/{DbNETcPs.js → Cf-5I5_6.js} +1 -1
- package/web/_app/immutable/chunks/Cl5gQm2e.js +1 -0
- package/web/_app/immutable/chunks/{BWVMfAMh.js → CryuQgNh.js} +1 -1
- package/web/_app/immutable/chunks/{CT_Ry4q8.js → Ct_EK1xu.js} +1 -1
- package/web/_app/immutable/chunks/{BymwHy7o.js → CtkUy_15.js} +1 -1
- package/web/_app/immutable/chunks/{Dpa4Syyy.js → CzYPMYd4.js} +1 -1
- package/web/_app/immutable/chunks/{RlApGeew.js → D1LK3xRu.js} +1 -1
- package/web/_app/immutable/chunks/{DXK7PB4g.js → D6sVhEz3.js} +1 -1
- package/web/_app/immutable/chunks/{jTXVas70.js → D9JwUycj.js} +1 -1
- package/web/_app/immutable/chunks/{rghE0CVz.js → DCZYeMlH.js} +1 -1
- package/web/_app/immutable/chunks/{RFxekmX-.js → DDAG55ce.js} +1 -1
- package/web/_app/immutable/chunks/{CyFLqlvP.js → DFuPQaNa.js} +1 -1
- package/web/_app/immutable/chunks/{BXAOBcPb.js → DHJ8FcFD.js} +1 -1
- package/web/_app/immutable/chunks/{Bt7VOT5H.js → DKqMzyyE.js} +1 -1
- package/web/_app/immutable/chunks/{Bq2GBAJ0.js → DRcTlHZP.js} +1 -1
- package/web/_app/immutable/chunks/{C_amgxV1.js → DjUnonHY.js} +1 -1
- package/web/_app/immutable/chunks/{whhiiiga.js → Djr0h_v1.js} +1 -1
- package/web/_app/immutable/chunks/{vfDvz3qP.js → DrVtdHUW.js} +1 -1
- package/web/_app/immutable/chunks/{Uo6irDQW.js → O98JkczU.js} +74 -74
- package/web/_app/immutable/chunks/{oWM_kgYq.js → PsfIQCJ1.js} +1 -1
- package/web/_app/immutable/chunks/{Cl5zRP_n.js → TanDZqdf.js} +1 -1
- package/web/_app/immutable/chunks/{D95RKsvN.js → UDPiRmKc.js} +1 -1
- package/web/_app/immutable/chunks/WLe0MT1c.js +1 -0
- package/web/_app/immutable/chunks/{BTclWEfx.js → ZwM5k8r0.js} +1 -1
- package/web/_app/immutable/chunks/e2LGvGEb.js +3 -0
- package/web/_app/immutable/chunks/ej_0XxR7.js +1 -0
- package/web/_app/immutable/chunks/{CjtKPNlv.js → kG4HctVa.js} +1 -1
- package/web/_app/immutable/chunks/{CQd9D8Nc.js → l1LsK1sB.js} +1 -1
- package/web/_app/immutable/chunks/{D_jbSWJl.js → s_hW4oA1.js} +1 -1
- package/web/_app/immutable/entry/app.DM_AWBgH.js +2 -0
- package/web/_app/immutable/entry/start.BLhIKDcR.js +1 -0
- package/web/_app/immutable/nodes/0.xSbkmYPn.js +2 -0
- package/web/_app/immutable/nodes/1.BD2wJdoH.js +1 -0
- package/web/_app/immutable/nodes/2.shPqwtS_.js +1 -0
- package/web/_app/immutable/nodes/3.e_5kWaf_.js +1 -0
- package/web/_app/immutable/nodes/4.BEMEU6Jz.js +15 -0
- package/web/_app/immutable/nodes/5.DxaO-e4O.js +1 -0
- package/web/_app/immutable/nodes/6.C9ia8cDm.js +1 -0
- package/web/_app/version.json +1 -1
- package/web/index.html +16 -19
- package/dist/core.js +0 -2464
- package/plugin/assets/mark-lapis.png +0 -0
- package/plugin/assets/mark-quartz.png +0 -0
- package/plugin/assets/wordmark-lapis.png +0 -0
- package/plugin/assets/wordmark-quartz.png +0 -0
- package/plugin/isorite.ts +0 -65
- package/plugin/logo.ts +0 -99
- package/plugin/notepage.tsx +0 -165
- package/plugin/notes.ts +0 -10
- package/plugin/noteview.ts +0 -60
- package/plugin/oneatlas.ts +0 -83
- package/plugin/palette.ts +0 -21
- package/plugin/play.ts +0 -104
- package/plugin/server.ts +0 -76
- package/plugin/sources.ts +0 -18
- package/plugin/tui.tsx +0 -556
- package/plugin/wordmark.ts +0 -180
- package/web/_app/immutable/assets/0.BXPxx6Q0.css +0 -1
- package/web/_app/immutable/assets/4.CUdclsPi.css +0 -1
- package/web/_app/immutable/assets/5.rBvyRuST.css +0 -1
- package/web/_app/immutable/assets/Drawing.Q7J9MyIo.css +0 -1
- package/web/_app/immutable/assets/NoteEditor.S3q5lmKq.css +0 -1
- package/web/_app/immutable/assets/Timeline.LsRXYIBv.css +0 -1
- package/web/_app/immutable/chunks/4kgFUGOH.js +0 -1
- package/web/_app/immutable/chunks/8SS1q0nk.js +0 -7
- package/web/_app/immutable/chunks/Bk_JinGf.js +0 -1
- package/web/_app/immutable/chunks/BqrMZ9MX.js +0 -1
- package/web/_app/immutable/chunks/DThNJvmp.js +0 -1
- package/web/_app/immutable/chunks/DbeMVOH4.js +0 -1
- package/web/_app/immutable/chunks/DsQj0LyB.js +0 -523
- package/web/_app/immutable/chunks/DshHzxgH.js +0 -1
- package/web/_app/immutable/chunks/Iqr2CudW.js +0 -3
- package/web/_app/immutable/entry/app.CvK8zypr.js +0 -2
- package/web/_app/immutable/entry/start.Dcgm6sQd.js +0 -1
- package/web/_app/immutable/nodes/0.0TdRBEoR.js +0 -26
- package/web/_app/immutable/nodes/1.Dchqgt4j.js +0 -1
- package/web/_app/immutable/nodes/2.C0CMUdSu.js +0 -1
- package/web/_app/immutable/nodes/3.MjtWDMWd.js +0 -1
- package/web/_app/immutable/nodes/4.hhS0SQta.js +0 -2
- package/web/_app/immutable/nodes/5.C33_cw2J.js +0 -9
- package/web/_app/immutable/nodes/6.owNfwwRl.js +0 -1
- package/web/_app/immutable/nodes/7.BpxHVHoY.js +0 -1
- /package/web/_app/immutable/assets/{7.C00vyVPo.css → 6.C00vyVPo.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,i as r,o as i,s as a,u as o,x as s}from"./
|
|
1
|
+
import{_ as e,a as t,b as n,i as r,o as i,s as a,u as o,x as s}from"./C2npZzkn.js";import{a as c,t as l}from"./DciMwFJ1.js";import{a as u,d,i as f,l as p,s as m}from"./BXBhaEho.js";import{n as h}from"./DDAG55ce.js";import{n as g}from"./BA78_vo5.js";import{i as _,t as v}from"./DKqMzyyE.js";import{i as y,r as b,t as x}from"./D1LK3xRu.js";import{PeleError as S,d as C,g as w,h as T,o as E,s as D,u as O}from"./CMikI1NP.js";function k(e){let t=`TB`;for(let n of e)typeof n!=`string`&&n.stmt===`dir`&&(t=n.value);return t}function A(e,t,n){let r=[],i=[],a=new Map,o=new Map,s=new Map,c=0,l=0,u=e=>{if(!e.id||e.id===`</join></fork>`||e.id===`</choice>`)return;if(e.cssClasses){let t;for(let r of e.cssClasses.split(` `)){let i=n.get(r);if(i){t??=e.cssCompiledStyles.slice();for(let e of i.styles)t.push(e)}}t&&(e.cssCompiledStyles=t)}let t=a.get(e.id);if(t){let n=e.parentId??t.parentId;Object.assign(t,e),n!==void 0&&(t.parentId=n)}else a.set(e.id,e),r.push(e)},d=(e,n,r)=>{let a=n.id;if(a===`root`)return;let d=t.get(a),f=d?.classes?.join(` `)??``,p=d?.styles??[],m=o.get(a);if(!m){let e=`rect`;n.start===!0?e=`stateStart`:n.start===!1&&(e=`stateEnd`),n.type!=="default"&&(e=n.type),m={shape:e,description:a,cssClasses:`${f} statediagram-state`,cssStyles:p,type:void 0,dir:void 0,colorIndex:void 0},o.set(a,m)}if(n.description&&(Array.isArray(m.description)?(m.shape=`rectWithTitle`,m.description=m.description.concat(n.description)):m.description.length>0?(m.shape=`rectWithTitle`,m.description=m.description===a?[n.description].flat():[m.description,n.description].flat()):(m.shape=`rect`,m.description=Array.isArray(n.description)?n.description.slice():n.description)),m.description.length===1&&m.shape===`rectWithTitle`&&(m.shape=m.type===`group`?`roundedWithTitle`:`rect`),!m.type&&n.doc){if(m.type=`group`,m.dir=k(n.doc),m.shape=n.type===`divider`?`divider`:`roundedWithTitle`,m.shape===`divider`&&e?.id!==void 0&&s.has(e.id))m.colorIndex=s.get(e.id);else{let e=l++;m.colorIndex=f.trim()!==``||p.length>0?void 0:e}s.set(a,m.colorIndex),m.cssClasses=`${m.cssClasses} statediagram-cluster ${r?`statediagram-cluster-alt`:``}`}let h=m.description,g={id:a,shape:m.shape,label:Array.isArray(h)?h[0]:h,description:Array.isArray(h)?h.slice(1):[],cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,type:m.type,isGroup:m.type===`group`,dir:m.dir,colorIndex:m.colorIndex};g.shape===`divider`&&(g.label=``),e&&e.id!==`root`&&(g.parentId=e.id);let _=n.note;if(!_){u(g);return}let v=(e,t,n,r)=>({id:e,shape:t,label:_.text,description:[],cssClasses:n,cssCompiledStyles:[],cssStyles:[],type:r?`group`:`node`,isGroup:r,dir:void 0,position:_.position}),y=v(`${a}----note-${c++}`,`note`,`statediagram-note`,!1);y.parentId=`${a}----parent`,y.noteFor=a,u(v(y.parentId,`noteGroup`,m.cssClasses,!0)),u(y),u(g);let b=_.position===`left of`,x=b?y.id:a,S=b?a:y.id;i.push({id:`${x}-${S}`,start:x,end:S,label:``,classes:`transition note-edge`,pattern:`dashed`})},f=[{item:void 0,doc:e,at:0,alt:!0}];for(;f.length>0;){let e=f[f.length-1];if(e.at>=e.doc.length){f.pop();continue}let t=e.doc[e.at++];typeof t!=`string`&&(t.stmt===`state`?(d(e.item,t,e.alt),t.doc&&f.push({item:t,doc:t.doc,at:0,alt:!e.alt})):t.stmt===`relation`&&(d(e.item,t.state1,e.alt),d(e.item,t.state2,e.alt),i.push({id:`edge${c++}`,start:t.state1.id,end:t.state2.id,label:t.description??``,classes:`transition`})))}for(let e of r)if(e.isGroup&&e.description.length>0)throw new S(`Group nodes can only have label. Remove the additional description for node [${e.id}]`,`semantic`,{type:`state`});return{nodes:r,edges:i}}var j=class{type=`state`;rootDoc=[];states=new Map;relations=[];classes=new Map;links=new Map;graph={nodes:[],edges:[]};title;accTitle;accDescr;dividerCount=0;get direction(){let e=`TB`;for(let t of this.rootDoc)typeof t!=`string`&&t.stmt===`dir`&&(e=t.value);return e}setRootDoc(e){this.rootDoc=e,this.translate(),this.extract(e)}extract(e){this.states=new Map,this.relations=[],this.classes=new Map;let t=Array.isArray(e)?e:e.doc;for(let e of t)if(typeof e!=`string`)switch(e.stmt){case`state`:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case`relation`:this.addRelation(e.state1,e.state2,e.description);break;case`classDef`:this.addStyleClass(e.id.trim(),e.classes);break;case`style`:{let t=e.styleClass.split(`,`).map(e=>e.replace(/;/g,``).trim());for(let n of this.named(e.id.trim()))n.styles=t.slice();break}case`applyClass`:this.setCssClass(e.id.trim(),e.styleClass);break;case`click`:this.addLink(typeof e.id==`string`?e.id:e.id.id,e.url,e.tooltip)}this.graph=A(t,this.states,this.classes)}translate(){let e=[[`root`,{stmt:`root`,id:`root`,doc:this.rootDoc},!0]];for(;e.length>0;){let[t,n,r]=e.pop();if(typeof n==`string`)continue;if(n.stmt===`relation`){e.push([t,n.state2,!1],[t,n.state1,!0]);continue}if(n.stmt===`state`)n.id===`[*]`?(n.id=t+(r?`_start`:`_end`),n.start=r):n.id=n.id.trim();else if(n.stmt!==`root`)continue;if(!n.doc)continue;let i=[],a=[];for(let e of n.doc)typeof e!=`string`&&e.stmt===`state`&&e.type===`divider`&&!e.doc?(i.push({...e,doc:a}),a=[]):a.push(e);i.length>0&&(a.length>0&&i.push({stmt:`state`,id:this.getDividerId(),type:`divider`,doc:a}),n.doc=i);for(let t=n.doc.length-1;t>=0;t--)e.push([n.id,n.doc[t],!0])}}addState(e,t=`default`,n,r,i,a){let o=e.trim(),s=this.states.get(o);if(s?(s.doc||(s.doc=n),s.type||(s.type=t)):(s={stmt:`state`,id:o,descriptions:[],type:t,doc:n,note:i,classes:[],styles:[],textStyles:[]},this.states.set(o,s)),r)for(let e of Array.isArray(r)?r:[r])this.addDescription(o,e.trim());if(i&&(s.note=i),a)for(let e of a)this.setCssClass(o,e.trim())}getState(e){return this.states.get(e)}addLink(e,t,n){this.links.set(e,{url:t,tooltip:n})}addRelation(e,t,n=``){for(let n of[e,t])this.addState(n.id,n.type,n.doc,n.description,n.note,n.classes);this.relations.push({id1:e.id.trim(),id2:t.id.trim(),relationTitle:n})}addDescription(e,t){this.states.get(e)?.descriptions?.push(t.startsWith(`:`)?t.replace(`:`,``).trim():t)}getDividerId(){return`divider-id-${++this.dividerCount}`}addStyleClass(e,t=``){let n=this.classes.get(e);if(n||(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t)for(let e of t.split(`,`)){let t=e.replace(`;`,``).trim();e.includes(`color`)&&n.textStyles.push(t.replace(`fill`,`bgFill`).replace(`color`,`fill`)),n.styles.push(t)}}setCssClass(e,t){for(let n of this.named(e))n.classes?.push(t)}getDirection(){for(let e of this.rootDoc)if(typeof e!=`string`&&e.stmt===`dir`)return e.value;return`TB`}setDirection(e){for(let t of this.rootDoc)if(typeof t!=`string`&&t.stmt===`dir`){t.value=e;return}this.rootDoc.unshift({stmt:`dir`,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}named(e){let t=[];for(let n of e.split(`,`)){let e=this.states.get(n);e||=(this.addState(n),this.states.get(n.trim())),e&&t.push(e)}return t}},M=`$end.INVALID.NL.SD.DESCR.-->.HIDE_EMPTY.scale.WIDTH.COMPOSIT_STATE.STRUCT_START.STRUCT_STOP.STATE_DESCR.AS.ID.FORK.JOIN.CHOICE.CONCURRENT.note.NOTE_TEXT.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.CLICK.STRING.HREF.classDef.CLASSDEF_ID.DEFAULT_CLASSDEF_ID.CLASSDEF_STYLEOPTS.DEFAULT.style.STYLE_IDS.STYLEDEF_STYLEOPTS.class.CLASSENTITY_IDS.STYLECLASS.direction_tb.direction_bt.direction_rl.direction_lr.EDGE_STATE.STYLE_SEPARATOR.left_of.right_of.INVALID`.split(`.`),N=/direction/gi,ee=/<<(?:fork|join|choice)>>|\[\[(?:fork|join|choice)\]\]/gi,te=/[\n\r\u2028\u2029]/g,P=/%%/g,F=/\{/g;function I(e,t){let n=0,r=-2;return i=>{if(r===-2||i<n||r!==-1&&i>r){e.lastIndex=i;let a=e.exec(t);r=a?a.index:-1,n=i}return r}}function L(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c,l=I(N,e),u=I(ee,e),d=I(te,e),f=I(P,e),p=I(F,e),m=-1,h=-1,g=[-1,-1,-1,-1],_=[0,0,0,0],v=-1,y=-1,b=[-1,-1,-1,-1,-1,-1],x=(t,a,o)=>{n.push(t),r.push(e.slice(a,o)),i.push(a),s=o},S=(e,t,a,o)=>{n.push(e),r.push(t),i.push(a),s=o},C=e=>{a.push(o),o=e},E=()=>{a.length>0&&(o=a.pop())},D=(t,n)=>{for(let r=0;r<t.length;r++){let i=t.charCodeAt(r),a=e.charCodeAt(n+r);if(a!==i&&!(i>=97&&i<=122&&a===i-32))return!1}return!0},O=n=>{let r=n;for(;r<t&&T(e.charCodeAt(r));)r++;return r},k=n=>{let r=n;for(;r<t&&w(e.charCodeAt(r));)r++;return r},A=n=>{let r=e.indexOf(`
|
|
3
3
|
`,n);return r===-1?t:r},j=e=>{let n=d(e);return n===-1?t:n},M=e=>{if(e<m||e>h){let n=l(e),r=n===-1?t:j(e);m=e,h=r,g[0]=g[1]=g[2]=g[3]=-1;for(let e=n;e!==-1&&e<r;e=l(e+1)){let t=O(e+9);if(t===e+9)continue;let n=D(`tb`,t)?0:D(`bt`,t)?1:D(`rl`,t)?2:D(`lr`,t)?3:-1;n!==-1&&(g[n]=e,_[n]=t+2)}}for(let t=0;t<4;t++)if(g[t]>=e)return t;return-1},L=n=>{if(n<v||n>y){let r=u(n),i=r===-1?t:j(n);v=n,y=i,b.fill(-1);for(let t=r;t!==-1&&t<i;t=u(t+1)){let n=e.charCodeAt(t+2)|32;b[(e.charCodeAt(t)===60?0:3)+(n===102?0:n===106?1:2)]=t}}for(let e=0;e<6;e++)if(b[e]>=n)return e;return-1},R=(e,t)=>{let n=f(e);return n===-1||n+2>t?(x(14,e,t),!0):n===e?(s=t,!1):(x(14,e,n),!0)},z=e=>(n.push(e),r.push(``),i.push(s),{types:n,texts:r,starts:i,error:c});for(;;){if(s>=t){switch(o){case 0:x(2,t,t);break;case 6:x(22,t,t);break;case 7:x(24,t,t);break;case 8:x(25,t,t);break;case 10:x(32,t,t);break;case 12:x(39,t,t);break;case 14:x(36,t,t);break;case 3:x(12,t,t);break;case 18:x(20,t,t);break;case 4:case 19:x(14,t,t)}return z(0)}let n=e.charCodeAt(s);switch(o){case 0:case 1:{let r=o===0,i=n|32;if(r){if(i===99&&D(`click`,s)&&!w(e.charCodeAt(s+5))){x(26,s,s+5);continue}if(i===104&&D(`href`,s)&&!w(e.charCodeAt(s+4))){x(28,s,s+4);continue}if(n===34){let t=e.indexOf(`"`,s+1);if(t!==-1){x(27,s,t+1);continue}}if(i===100&&D(`default`,s)&&!w(e.charCodeAt(s+7))){x(33,s,s+7);continue}let t=M(s);if(t!==-1){x(40+t,s,A(_[t]));continue}if(n===10){let t=s+1;for(;e.charCodeAt(t)===10;)t++;x(2,s,t);continue}if(T(n)){s=O(s);continue}}else if(n!==10&&T(n)){let n=s+1;for(;n<t&&e.charCodeAt(n)!==10&&T(e.charCodeAt(n));)n++;s=n;continue}if(n===35||n===37&&e.charCodeAt(s+1)===37&&e.charCodeAt(s+2)!==123){s=A(s);continue}if(i===115){if(r&&D(`scale`,s)){let e=O(s+5);if(e>s+5){x(7,s,e),C(5);continue}}if(D(`style`,s)){let e=O(s+5);if(e>s+5){x(34,s,e),C(13);continue}}if(D(`state`,s)){let e=O(s+5);if(e>s+5){s=e,C(2);continue}if(r&&D(`diagram`,s+5)){let t=D(`-v2`,s+12)?s+15:s+12;if(e=O(t),e>t){x(3,s,e);continue}}}}else if(i===99){if(D(`class`,s)){let e=D(`def`,s+5),t=e?s+8:s+5,n=O(t);if(n>t){x(e?29:37,s,n),C(e?9:11);continue}}}else if(i===97&&r&&(D(`acctitle`,s)||D(`accdescr`,s))){let t=(e.charCodeAt(s+3)|32)==116,n=O(s+8),r=e.charCodeAt(n);if(r===58){x(t?21:23,s,O(n+1)),C(t?6:7);continue}if(r===123&&!t){s=O(n+1),C(8);continue}}if(r){if(n===123){x(10,s,s+1),C(1);continue}}else{let e=M(s);if(e!==-1){x(40+e,s,A(_[e]));continue}if(n===125){x(11,s,s+1),E();continue}if(n===10){s++;continue}}if(i===110&&D(`note`,s)){let e=O(s+4);if(e>s+4){x(19,s,e),C(15);continue}}if(r&&i===104&&D(`hide empty description`,s)&&!w(e.charCodeAt(s+22))){x(6,s,s+22);continue}if(n===91&&e.charCodeAt(s+1)===42&&e.charCodeAt(s+2)===93){x(44,s,s+3);continue}let a=s;for(;a<t;){let t=e.charCodeAt(a);if(t===58||t===45||t===123||T(t))break;a++}if(a>s){R(s,a);continue}if(n===58){for(a=s+1;a<t;){let n=e.charCodeAt(a);if(n===10||n===59)break;if(n===58){let n=e.charCodeAt(a+1);if(a+1>=t||n===58||n===10||n===59)break;a++}a++}if(a>s+1){S(4,e.slice(s,a).trim(),s,a);continue}if(e.charCodeAt(s+1)===58&&e.charCodeAt(s+2)===58){x(45,s,s+3);continue}}else if(n===45&&e.charCodeAt(s+1)===45){if(e.charCodeAt(s+2)===62){x(5,s,s+3);continue}if(!r){x(18,s,s+2);continue}}if(!r)return z(1);x(48,s,s+1);continue}case 2:{if(n!==10&&T(n)){let n=s+1;for(;n<t&&e.charCodeAt(n)!==10&&T(e.charCodeAt(n));)n++;s=n;continue}if(n===35||n===37&&e.charCodeAt(s+1)===37&&e.charCodeAt(s+2)!==123){s=A(s);continue}let r=L(s);if(r!==-1){let t=b[r],n=r===2||r===5;S(n?17:r%3==0?15:16,e.slice(s,t).trim(),s,t+(n?10:8)),E();continue}if(n===34){s++,C(3);continue}let i=n===10?O(s):s;if(D(`as`,i)){let e=O(i+2);if(e>i+2){x(13,s,e),C(4);continue}}if(n===10){s++,E();continue}if(n===123){x(10,s,s+1),E(),C(1);continue}if(w(n)){let t=k(s),n=O(t);if(n>t&&w(e.charCodeAt(n))){let t=p(n+1);if(t!==-1&&t<j(n))return c=`Error: State name must be a single word. Found: "${e.slice(s,t+1).trim()}"`,z(1)}}let a=s+1;for(;a<t;){let t=e.charCodeAt(a);if(t===123||T(t))break;a++}x(9,s,a);continue}case 3:{if(n===34){s++,E();continue}let r=e.indexOf(`"`,s);x(12,s,r===-1?t:r);continue}case 4:{let n=s;for(;n<t;){let t=e.charCodeAt(n);if(t===10||t===123)break;n++}R(s,n)&&E();continue}case 5:{if(n>=48&&n<=57){let n=s+1;for(;n<t&&e.charCodeAt(n)>=48&&e.charCodeAt(n)<=57;)n++;x(8,s,n);continue}let r=O(s);if(r>s&&D(`width`,r)&&!w(e.charCodeAt(r+5))){s=r+5,E();continue}return z(1)}case 6:x(22,s,A(s)),E();continue;case 7:x(24,s,A(s)),E();continue;case 8:{if(n===125){s++,E();continue}let r=e.indexOf(`}`,s);x(25,s,r===-1?t:r);continue}case 9:{let e=D(`default`,s)&&O(s+7)>s+7,t=e?s+7:k(s),n=O(t);if(t===s||n===t)return z(1);x(e?31:30,s,n),E(),C(10);continue}case 10:x(32,s,A(s)),E();continue;case 11:{let t=k(s);if(t===s)return z(1);for(;e.charCodeAt(t)===44;){let e=O(t+1),n=k(e);if(n===e)break;t=n}x(38,s,t),E(),C(12);continue}case 12:x(39,s,A(s)),E();continue;case 13:{let n=s;for(;n<t&&(w(e.charCodeAt(n))||e.charCodeAt(n)===44);)n++;let r=O(n);if(n===s||r===n)return z(1);x(35,s,r),E(),C(14);continue}case 14:x(36,s,A(s)),E();continue;case 15:if(D(`left of`,s)&&!w(e.charCodeAt(s+7))){x(46,s,s+7),E(),C(16);continue}if(D(`right of`,s)&&!w(e.charCodeAt(s+8))){x(47,s,s+8),E(),C(16);continue}if(n===34){s++,E(),C(18);continue}return z(1);case 16:{let n=O(s),r=n;for(;r<t;){let t=e.charCodeAt(r);if(t===58||t===45||T(t))break;r++}if(r===n)return z(1);R(s,r)&&(E(),C(17));continue}case 17:{let n=O(s);if(e.charCodeAt(n)===58){let r=n+1;for(;r<t;){let t=e.charCodeAt(r);if(t===58||t===10||t===59)break;r++}if(r>n+1){S(20,e.slice(s+2,r).trim(),s,r),E();continue}}let r=e.indexOf(`
|
|
4
4
|
`,s),i=-1;for(;r!==-1&&(i=O(r),!D(`end note`,i)||w(e.charCodeAt(i+8)));)r=e.indexOf(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,f as t,i as n,o as r,u as i,x as a}from"./
|
|
1
|
+
import{_ as e,f as t,i as n,o as r,u as i,x as a}from"./C2npZzkn.js";import{n as o,r as s}from"./DciMwFJ1.js";import{a as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C}from"./CTDYUZPz.js";import{PeleError as w,u as T}from"./CMikI1NP.js";var E=32;function D(e){return new w(e,`semantic`,{type:`radar`})}function O(e,t){let n=e.axes.map(e=>({name:e.name,label:e.label??e.name})),r=e.curves.map(e=>{let t;if(e.entries[0].axis===void 0)t=e.entries.map(e=>e.value);else{if(n.length===0)throw D(`Axes must be populated before curves for reference entries`);let r=new Map;for(let t of e.entries)t.axis!==void 0&&!r.has(t.axis.$refText)&&r.set(t.axis.$refText,t.value);t=n.map(e=>{let t=r.get(e.name);if(t===void 0)throw D(`Missing entry for axis `+e.label);return t})}return{name:e.name,label:e.label??e.name,entries:t}}),i={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`};for(let t of e.options)t.name===`showLegend`?i.showLegend=t.value:t.name===`graticule`?i.graticule=t.value:i[t.name]=t.value;return i.ticks>E&&(i.ticks=E),{type:`radar`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
2
|
`):void 0,axes:n,curves:r,options:i}}var k=0,A=0;function j(e,t){let n=t;for(let t=e.charCodeAt(n);t>=48&&t<=57;t=e.charCodeAt(n))n++;return n}function M(e,t){(t<k||t>=A)&&(k=t,A=j(e,t));let n=A;if(n===t)return-1;let r=e.charCodeAt(n)===46;if(r){let t=j(e,n+1),r=t-n-1;if(r>0&&e.charCodeAt(t)!==46)return t;if(r>1)return t-1}return e.charCodeAt(t)===48?t+1:r?n-1>t?n-1:-1:n}var N=c.pattern,P=/[\t ]*accDescr\s*{/y,F=-2;function I(e,t){return P.lastIndex=t,P.test(e)&&(F===-2&&(F=e.lastIndexOf(`}`)),P.lastIndex>F)?-1:(N.lastIndex=t,N.test(e)?N.lastIndex:-1)}var L={name:`ID`,pattern:/[\w]([-\w]*\w)?/y},R=e=>({name:e,pattern:e,longer:[L]}),z=e=>({name:e,pattern:e}),B=[z(`radar-beta:`),{...m(`radar-beta`),longer:[L]},R(`showLegend`),R(`graticule`),R(`curve`),R(`ticks`),R(`axis`),R(`max`),R(`min`),z(`:`),z(`,`),z(`[`),z(`]`),z(`{`),z(`}`),{name:`GRATICULE`,pattern:/circle|polygon/y},{name:`BOOLEAN`,pattern:/true|false/y},{...c,match:I},S,y,{name:`NUMBER`,pattern:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/y,match:M},g,L,h,C,b,v,x];function V(e){return k=A=0,F=-2,_(e,B,`radar`)}function H(e){let t=new p(V(e),B,`radar`),n={$type:`Radar`,axes:[],curves:[],options:[]},r=()=>{for(;t.kind===23;)t.i++},i=()=>{t.kind!==-1&&(t.kind!==23&&t.fail(`a line break or the end of input`),r())},a=()=>{if(!t.accept(11))return;let e=d(t.expect(21));return t.expect(12),e},o=e=>{if(!e)return{$type:`Entry`,value:Number(t.expect(20))};let n={$refText:t.expect(22)};return t.accept(9),{$type:`Entry`,axis:n,value:Number(t.expect(20))}},s=()=>{let e=t.expect(22),n=a(),i={$type:`Curve`,name:e,entries:[]};n!==void 0&&(i.label=n),t.expect(13),r(),t.kind!==20&&t.kind!==22&&t.fail(`a number or an axis name`);let s=t.kind===22;for(i.entries.push(o(s));t.accept(10);)r(),i.entries.push(o(s));return r(),t.expect(14),i},c=()=>{let e={$type:`Axis`,name:t.expect(22)},n=a();return n!==void 0&&(e.label=n),e},m=()=>{let e=t.kind,n=t.take(),r;return r=e===2?t.expect(16)===`true`:e===3?t.expect(15):Number(t.expect(20)),{$type:`Option`,name:n,value:r}},h=()=>t.kind===2||t.kind===5||t.kind===7||t.kind===8||t.kind===3;for(r(),t.accept(0)||(t.expect(1),t.accept(9)),r();t.kind!==-1;)switch(t.kind){case 23:t.i++;break;case 17:n.accDescr=l(t.take()),i();break;case 18:n.accTitle=f(t.take()),i();break;case 19:n.title=u(t.take()),i();break;case 6:t.i++;do n.axes.push(c());while(t.accept(10));break;case 4:t.i++;do n.curves.push(s());while(t.accept(10));break;default:for(h()||t.fail(`an axis, a curve, an option, a title, or a line break`),n.options.push(m());t.accept(10);)h()||t.fail(`an option`),n.options.push(m())}return n}var U=12,W=26,G=24;function K(e,t,n,r,i){let a=e.radar?.[t];return typeof a==`number`&&a>=r?Math.min(a,i):n}function ee(e,t,n,r){let i=Math.min(Math.max(e,t),n),a=r*(i-t);return Number.isFinite(a)?a/(n-t):r*((i-t)/(n-t))}function te(e,t){let n=e.length,r=`M${a(e[0].x)},${a(e[0].y)}`;for(let i=0;i<n;i++){let o=e[(i-1+n)%n],s=e[i],c=e[(i+1)%n],l=e[(i+2)%n];r+=` C${a(s.x+(c.x-o.x)*t)},${a(s.y+(c.y-o.y)*t)} ${a(c.x-(l.x-s.x)*t)},${a(c.y-(l.y-s.y)*t)} ${a(c.x)},${a(c.y)}`}return r+` Z`}function q(e){let t=``;for(let n of e)t+=(t?` `:``)+a(n.x)+`,`+a(n.y);return t}function J(e,t,n){let r=K(t,`width`,320,1,4e3);return o(n,r,160,(i,a)=>Y(e,t,n,i,K(t,`height`,320,1,4e3)*i/r,a))}function Y(o,c,l,u,d,f){let p=l.fontSize??16,m=Math.round(p*.875),h=l.measurer??T(l.fontFamily,l.fontFamilyMono),g=l.padding??8,_=K(c,`axisScaleFactor`,1,0,10),v=K(c,`axisLabelFactor`,1.05,0,10),y=K(c,`curveTension`,.17,0,1),b=Math.min(u,d)/2,{axes:x,curves:S}=o,{ticks:C,graticule:w,min:E}=o.options,D=x.length,O=x.map((e,t)=>{let n=2*Math.PI*t/D-Math.PI/2;return{x:Math.cos(n),y:Math.sin(n)}}),k=o.options.max;if(k===null){k=-1/0;for(let e of S)for(let t of e.entries)t>k&&(k=t)}let A=-u/2-K(c,`marginLeft`,16,0,2e3),j=u/2+K(c,`marginRight`,16,0,2e3),M=-d/2-K(c,`marginTop`,16,0,2e3),N=d/2+K(c,`marginBottom`,16,0,2e3),P=``;for(let e=0;e<C;e++){let t=Math.min(b,b*(e+1)/C);P+=w===`circle`?`<circle r="${a(t)}"/>`:`<polygon points="${q(O.map(e=>({x:e.x*t,y:e.y*t})))}"/>`}let F=``,I=``;O.forEach((e,t)=>{let o=b*_;F+=`M0,0L${a(e.x*o)},${a(e.y*o)}`;let s=i(x[t].label,!1,h,m,4e3),c=b*v+6,l=e.x*c+(e.x>.01?s.width/2:e.x<-.01?-s.width/2:0),u=e.y*c+(e.y>.01?s.height/2:e.y<-.01?-s.height/2:0);I+=`<g class="pele-axis-label" data-id="${n(x[t].name)}">${r(s,l,u,``)}</g>`,A=Math.min(A,l-s.width/2),j=Math.max(j,l+s.width/2),M=Math.min(M,u-s.height/2),N=Math.max(N,u+s.height/2)});let L=``;S.forEach((e,r)=>{if(e.entries.length!==D)return;let i=e.entries.map((e,t)=>{let n=ee(e,E,k,b),r=Number.isFinite(n)?n:0;return{x:O[t].x*r,y:O[t].y*r}}),a=t(r),o=` class="pele-curve" data-id="${n(e.name)}" fill="${a}" stroke="${a}"`;L+=w===`circle`?`<path${o} d="${te(i,y)}"/>`:`<polygon${o} points="${q(i)}"/>`});let R=o.options.showLegend?S.map(e=>i(e.label,!1,h,m,4e3)):[],z=0;for(let e of R)z=Math.max(z,e.width);let B=R.length*W,V=f?-(U+8+z)/2:j+G,H=f?N+G/2:-B/2;R.length>0&&f?(A=Math.min(A,V),j=Math.max(j,-V),N=H+B):R.length>0&&(j=V+U+8+z,M=Math.min(M,-B/2),N=Math.max(N,B/2));let J=``;R.forEach((e,i)=>{let o=H+i*W+W/2,s=t(i);J+=`<g class="pele-legend-item" data-id="${n(S[i].name)}"><rect x="${a(V)}" y="${a(o-U/2)}" width="${U}" height="${U}" rx="2" fill="${s}" fill-opacity="0.4" stroke="${s}"/>`+r(e,V+U+8+e.width/2,o,``)+`</g>`});let Y=i(o.title,!1,h,p,s(l),1),X=Y.height>0?Y.height+8:0,Z=Math.max(j-A,Y.width),Q=Math.ceil(Z+2*g),$=Math.ceil(N-M+X+2*g),ne=`translate(${a(g+(Z-(j-A))/2-A)},${a(g+X-M)})`,re=r(Y,Q/2,g+Y.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="${ne}">`+(P?`<g class="pele-graticule" fill="none" stroke="var(--_a)">${P}</g>`:``)+(F?`<path class="pele-axes" d="${F}" fill="none" stroke="var(--_b)"/>`:``)+(L?`<g class="pele-curves" fill-opacity="0.2" stroke-width="1.5" stroke-linejoin="round">${L}</g>`:``)+(I?`<g class="pele-axis-labels" font-size="${m}">${I}</g>`:``)+(J?`<g class="pele-legend" font-size="${m}">${J}</g>`:``)+`</g>`;return{svg:e(`radar`,Q,$,p,l,o,re),width:Q,height:$,links:[]}}var X={type:`radar`,parse:(e,t,n)=>O(H(e),n),render:J};export{X as radar};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Cl5gQm2e.js","./Bd-WxALw.js","./C2npZzkn.js","./DciMwFJ1.js","./BXBhaEho.js","./DDAG55ce.js","./BA78_vo5.js","./DKqMzyyE.js","./D6QVYUu9.js","./BCGaqnao.js","./D1LK3xRu.js","./CggtIYAM.js","./UDPiRmKc.js","./CTDYUZPz.js","./CdmC_l9F.js","./BZmnMkFw.js","./B-DzK7Gb.js","./kG4HctVa.js","./DCZYeMlH.js","./Bb_N98K9.js","./CT4_O9X_.js","./CtkUy_15.js","./BWE_HS0c.js","./CdY1G_wk.js","./ZwM5k8r0.js","./CgA1WoRv.js","./TanDZqdf.js","./CFf_dAzX.js","./CzYPMYd4.js","./Ct_EK1xu.js","./BiATTH-R.js","./B35sQTcK.js","./CryuQgNh.js","./Ce_hS451.js","./C8h1oeAZ.js","./CMIt1Ma8.js","./DjUnonHY.js","./C5Z-Y7Lu.js","./DrVtdHUW.js","./D6sVhEz3.js","./Bj-5n5Pb.js","./Cf-5I5_6.js","./Djr0h_v1.js","./BhEqJU15.js","./BqipEJXw.js","./l1LsK1sB.js","./BT_btfh0.js","./BK31dpt6.js","./PsfIQCJ1.js","./DHJ8FcFD.js","./DRcTlHZP.js","./DFuPQaNa.js","./BvPxdlBc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{ht as e}from"./e2LGvGEb.js";import{t}from"./CRzLMJPS.js";function n(e){return e<128?e===32||e>=9&&e<=13:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function r(e){return e===32||e===9}function i(e){return e===10||e===13||e===8232||e===8233}function a(e){return e>=48&&e<=57}function o(e){return e>=65&&e<=90||e>=97&&e<=122}function s(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function c(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95}var l=class extends Error{code;type;mermaidType;line;column;snippet;constructor(e,t=`syntax`,n={}){super(e),this.name=`PeleError`,this.code=t,this.type=n.type??null,this.mermaidType=n.mermaidType??null,this.line=n.line??0,this.column=n.column??0,this.snippet=n.snippet??``}};function u(e,t,n){return Array.from(e.matchAll(t),e=>[e.index,e.index+e[0].length,n])}function d(e,t){let n=0;for(let[r,i,a]of e){let e=r-n;if(t<e)break;if(t<e+a)return r+Math.min(t-e,i-r-1);n+=i-r-a}return t+n}function f(e,t){for(let n=e.length-1;n>=0;n--)t=d(e[n],t);return t}var p;function m(e,t){let n=p;p=e;try{return t()}finally{p=n}}function h(e,t){return p!==void 0&&e===p.parsed?p.find(t):[e,t]}function g(e,t){[e,t]=h(e,t);let n=1,r=0;for(let i=e.indexOf(`
|
|
3
3
|
`);i!==-1&&i<t;i=e.indexOf(`
|
|
4
4
|
`,i+1))n++,r=i+1;let i=e.indexOf(`
|
|
5
5
|
`,t);i===-1&&(i=e.length);let a=t-r+1,o=e.slice(r,i);return{line:n,column:a,snippet:o+`
|
|
@@ -42,4 +42,4 @@ ${r}`,`syntax`,{type:e,...a})}var v=`amp:38,lt:60,gt:62,quot:34,apos:39,nbsp:160
|
|
|
42
42
|
`,e+1))o++;n=n.slice(s.length),t?.push([[0,s.length,0]])}return n=Ge(n,i,t),{text:ze(n),title:a,config:i,withComments:n,lineOffset:o}}var qe=/#\w+;/g,Je=/^\+?\d+$/,Ye=RegExp(`[\\n\\r\u2028\u2029]`,`g`);function Xe(e){if(e===void 0)return;let t=[];return e.push(t),t}function Ze(e,t,r){let i=Xe(r),a=e.indexOf(t);if(a===-1)return e;let o=``,s=0;for(;a!==-1;){Ye.lastIndex=a;let r=Ye.test(e)?Ye.lastIndex-1:e.length,c=!1,l=-1;for(let i=a+t.length;i<r;i++){let t=e.charCodeAt(i);if(t===58)c=!0;else if(t===35){if(c){l=i;break}}else n(t)&&(c=!1)}if(l!==-1){let t=e.lastIndexOf(`;`,r-1);t>l&&(i?.push([t,t+1,0]),o+=e.slice(s,t),s=t+1)}a=r>=e.length?-1:e.indexOf(t,r+1)}return s===0?e:o+e.slice(s)}function Qe(e,t){if(!e.includes(`#`))return e;e=Ze(Ze(e,`style`,t),`classDef`,t);let n=Xe(t);return e.replace(qe,(e,t)=>{let r=e.substring(1,e.length-1),i=(Je.test(r)?`fl°°`:`fl°`)+r+`¶ß`;return n?.push([t,t+e.length,i.length]),i})}function Z(e){return e.ownerDocument?.defaultView??globalThis}function $e(e,t){let n=e.clientWidth-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0);return n>0?n:0}function et(e,t,n,r,i){let a=t.width/n,o=t.height/n,s=(e,t,n)=>t>=n?Math.min(Math.max(e,n-t),0):Math.min(Math.max(e,0),n-t);return{x:s(r,a,e.width),y:s(i,o,e.height),width:a,height:o}}var Q=1.25,tt=48,nt=`--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_b:var(--pele-border,#8a8a8a);position:absolute;top:var(--pele-zoom-top,8px);right:var(--pele-zoom-right,8px);bottom:var(--pele-zoom-bottom,auto);left:var(--pele-zoom-left,auto);display:flex;flex-direction:column;gap:2px;padding:2px;width:auto;max-width:none;border:1px solid var(--_b);border-radius:var(--pele-radius,4px);background:var(--_bg);color:var(--_fg);line-height:0`,rt=`appearance:none;display:grid;place-items:center;width:24px;height:24px;margin:0;padding:0;border:0;border-radius:calc(var(--pele-radius,4px) - 1px);background:transparent;color:inherit;font:inherit;cursor:var(--pele-zoom-cursor,pointer)`,it={zoomIn:`M5 12h14M12 5v14`,zoomOut:`M5 12h14`,reset:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8M3 3v5h5`},at={zoomIn:`Zoom in`,zoomOut:`Zoom out`,reset:`Reset zoom`};function ot(e,t={}){return st(e,t,!0)}function st(e,t,n){let r=null,i={width:0,height:0},a={width:0,height:0},o={width:0,height:0},s=!1,c=``,l={width:``,height:``,maxWidth:``,margin:``,display:``},u=0,d=0,f=0,p=0,m=()=>Z(e),h=()=>i.width>0&&a.width>0?a.width/i.width:1,g=()=>Math.max(h(),t.maxScale??3),_=()=>r!==null&&i.width>0&&(t.always===!0||h()<.999),v=()=>{if(!r||u!==0)return;let t=r.getBoundingClientRect();a={width:t.width,height:t.height},o={width:Math.max(a.width,e.clientWidth),height:Math.max(a.height,e.clientHeight)},s=o.width>a.width+1||o.height>a.height+1,s||(o=a);let n=m().getComputedStyle(e);c=[`Top`,`Right`,`Bottom`,`Left`].map(e=>`${-(parseFloat(n.getPropertyValue(`padding-${e.toLowerCase()}`))||0)}px`).join(` `)},y,b={},x=!1,S=()=>{if(t.controls===!1)return;let n=_();if(!y){if(!n)return;let r=e.ownerDocument;y=r.createElement(`div`),y.className=`pele pele-zoom`,y.setAttribute(`style`,nt);let i={zoomIn:()=>T((u||h())*Q*Q),zoomOut:()=>T((u||h())/(Q*Q)),reset:()=>w()};for(let e of[`zoomIn`,`zoomOut`,`reset`]){let n=r.createElement(`button`),a=t.labels?.[e]??at[e];n.type=`button`,n.className=`pele-zoom-${e===`zoomIn`?`in`:e===`zoomOut`?`out`:`reset`}`,n.setAttribute(`style`,rt),n.setAttribute(`aria-label`,a),n.title=a,n.innerHTML=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${it[e]}"/></svg>`,n.addEventListener(`click`,i[e]),b[e]=n,y.append(n)}}n&&!x&&m().getComputedStyle(e).position===`static`&&(e.style.position=`relative`,x=!0),n&&y.parentNode!==e&&e.append(y),y.hidden=!n,y.style.display=n?`flex`:`none`;let r=(e,t)=>{e&&(e.disabled=t,e.style.opacity=t?`0.35`:``,e.style.cursor=t?`default`:`var(--pele-zoom-cursor,pointer)`)};r(b.zoomIn,(u||h())>=g()*.999),r(b.zoomOut,u===0),b.reset&&(b.reset.style.display=u===0?`none`:`grid`)},C=e=>y!==void 0&&e.target instanceof m().Node&&y.contains(e.target),w=()=>{r&&(u=0,r.setAttribute(`viewBox`,`0 0 ${i.width} ${i.height}`),r.style.width=l.width,r.style.height=l.height,r.style.maxWidth=l.maxWidth,r.style.margin=l.margin,r.style.display=l.display,r.style.cursor=``,r.style.userSelect=``,v(),r.style.touchAction=_()?`pan-y`:``,_()?r.setAttribute(`tabindex`,`0`):r.removeAttribute(`tabindex`),B(_()),S())},T=(e,t,n)=>{if(!r||(u===0&&v(),!_()))return;let i=u||h(),a=Math.min(Math.max(e,h()),g());if(a<=h()*1.001){w();return}let l=r.getBoundingClientRect(),p=t??l.left+l.width/2,m=n??l.top+l.height/2,y=(u?d:0)+(p-l.left)/i,b=(u?f:0)+(m-l.top)/i;u=a;let x=l;s&&(r.style.maxWidth=`none`,r.style.margin=c,r.style.display=`block`,r.style.width=`${o.width}px`,r.style.height=`${o.height}px`,x=r.getBoundingClientRect()),E(y-(p-x.left)/u,b-(m-x.top)/u),r.style.cursor=`grab`,r.style.userSelect=`none`,r.style.touchAction=`none`,S()},E=(e,t)=>{if(!r)return;let n=et(i,o,u,e,t);d=n.x,f=n.y,r.setAttribute(`viewBox`,`${d} ${f} ${n.width} ${n.height}`)},D=(e,t)=>{u!==0&&E(d-e/u,f-t/u)},O=()=>{j();let t=e.clientWidth+e.clientHeight;t!==p&&(p=t,w())},k,A,j=()=>{if(!n)return;let t=m();t!==A&&(k?.disconnect(),A=t,k=t.ResizeObserver?new t.ResizeObserver(O):void 0,k?.observe(e))},M=()=>{j();let t=e.firstElementChild;r=t&&t.localName===`svg`?t:null,u=0,r?(i={width:Number(r.getAttribute(`width`))||0,height:Number(r.getAttribute(`height`))||0},l={width:r.style.width,height:r.style.height,maxWidth:r.style.maxWidth,margin:r.style.margin,display:r.style.display},w()):(y?.remove(),B(!1))},N=new Map,P=!1,F=0,I=0,L=()=>{let[e,t]=[...N.values()];return{distance:Math.hypot(e.x-t.x,e.y-t.y),x:(e.x+t.x)/2,y:(e.y+t.y)/2}},R=t=>{!_()||C(t)||t.pointerType===`mouse`&&t.button!==0||(N.set(t.pointerId,{x:t.clientX,y:t.clientY}),F=0,N.size===2&&(I=L().distance),(N.size===2||u!==0)&&(e.setPointerCapture?.(t.pointerId),r&&(r.style.cursor=`grabbing`)))},ee=e=>{let t=N.get(e.pointerId);if(t){if(N.size===2){let t=L();N.set(e.pointerId,{x:e.clientX,y:e.clientY});let n=L();I>0&&n.distance>0&&T((u||h())*(n.distance/t.distance),n.x,n.y),D(n.x-t.x,n.y-t.y),P=!0;return}N.set(e.pointerId,{x:e.clientX,y:e.clientY}),u!==0&&(F+=Math.abs(e.clientX-t.x)+Math.abs(e.clientY-t.y),F>4&&(P=!0),D(e.clientX-t.x,e.clientY-t.y))}},te=e=>{N.delete(e.pointerId)&&(I=0,N.size===0&&r&&u!==0&&(r.style.cursor=`grab`))},ne=e=>{P&&(P=!1,e.preventDefault(),e.stopPropagation())},re=e=>{if(!(e.ctrlKey||e.metaKey)||!_())return;e.preventDefault(),u===0&&v();let t=Math.min(Math.max(-e.deltaY,-24),24);T((u||h())*2**(t*.02),e.clientX,e.clientY)},ie=e=>{!_()||C(e)||(e.preventDefault(),u===0?T(Math.max(1,h()*2),e.clientX,e.clientY):w())},ae=e=>{if(!_()||C(e)||e.ctrlKey||e.metaKey||e.altKey)return;let t=e.key;if(t===`+`||t===`=`)T((u||h())*Q);else if(t===`-`)T((u||h())/Q);else{if(u===0)return;if(t===`0`||t===`Escape`)w();else if(t===`ArrowLeft`)D(tt,0);else if(t===`ArrowRight`)D(-tt,0);else if(t===`ArrowUp`)D(0,tt);else if(t===`ArrowDown`)D(0,-tt);else return}e.preventDefault()},oe=e=>{if(!r||e.target!==r)return;let t=!0;try{t=r.matches(`:focus-visible`)}catch{}r.style.outline=t?``:`none`},z=0,se=e=>{_()&&(e.preventDefault(),u===0&&v(),z=u||h())},ce=e=>{if(z===0)return;e.preventDefault();let{scale:t,clientX:n,clientY:r}=e;T(z*t,n,r)},le=()=>{z=0},ue=[[`pointerdown`,R],[`pointermove`,ee],[`pointerup`,te],[`pointercancel`,te],[`click`,ne,{capture:!0}],[`dblclick`,ie],[`keydown`,ae],[`focusin`,oe]];for(let[t,n,r]of ue)e.addEventListener(t,n,r);let de=[[`wheel`,re,{passive:!1}],[`gesturestart`,se,{passive:!1}],[`gesturechange`,ce,{passive:!1}],[`gestureend`,le,{passive:!1}]],fe=!1;function B(t){if(t!==fe){fe=t;for(let[n,r,i]of de)t?e.addEventListener(n,r,i):e.removeEventListener(n,r,i);t||(z=0)}}return p=e.clientWidth+e.clientHeight,M(),{get scale(){return u||h()},get fit(){return h()},zoomBy(e){T((u||h())*e)},zoomTo(e){T(e)},reset:w,refresh:M,resized:O,destroy(){w(),r&&(r.style.touchAction=``,r.removeAttribute(`tabindex`)),y?.remove(),x&&(e.style.position=``),k?.disconnect(),B(!1);for(let[t,n,r]of ue)e.removeEventListener(t,n,r)}}}function ct(e,t){let n=t?Z(t).getComputedStyle(t):e;return{family:n.getPropertyValue(`--pele-font`).trim()||e.fontFamily||void 0,mono:n.getPropertyValue(`--pele-font-mono`).trim()||void 0}}function lt(e){return[...new Set([e.ownerDocument?.fonts,globalThis.document?.fonts])].filter(e=>e!==void 0)}var ut=new WeakMap;function dt(e){let t=ut.get(e);return t||(t=e.ready.then(()=>{ut.delete(e),he()}),ut.set(e,t)),t}var ft=new WeakMap;function pt(e,t){Promise.all(e.map(dt)).then(()=>{let e=t.deref();e&&ft.get(e)?.()})}var mt=new WeakMap,ht=0,gt=Math.random().toString(36).slice(2,7),_t=`position:relative;height:1.3em;margin-top:-1.3em;line-height:1.3;font-size:0.8em;color:var(--pele-error,#e45756);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`,vt=`margin:0;font-size:0.8em;font-family:var(--pele-font-mono,monospace);color:var(--pele-error,#e45756);white-space:pre-wrap;`;function yt(e){return e instanceof Error?e.message:String(e)}function bt(e){let t=e.split(`
|
|
43
43
|
`).filter(e=>e.trim()!==``);return t.length>1?`${t[0]} ${t[t.length-1]}`:t[0]??``}function xt(e,t,n,r={}){mt.get(t)?.destroy();let i=n,a=r,o,s,c=!1,l,u,d,f=`pele-${gt}-${++ht}`,p={},m,h=-1,g=!1,_=!1,v=!1,y=(n,r)=>{let{onRender:i,onError:s,sanitize:c,...l}=a,d={...l,idPrefix:l.idPrefix??f,fontFamily:l.fontFamily??p.family,fontFamilyMono:l.fontFamilyMono??p.mono,maxWidth:void 0};r&&(u=e.render(o,d),m=void 0);let g=a.maxWidth??$e(t,n);return h=g,g>0&&g<u.width&&(m??=e.render(o,{...d,maxWidth:1}).svg!==u.svg,m)?e.render(o,{...d,maxWidth:g}):u},b=e=>{a.sanitize?t.replaceChildren(a.sanitize(e)):t.innerHTML=e},x,S=()=>{let e=d?t.firstElementChild:null;if(e?.style&&(e.style.opacity=l===void 0?``:`0.4`),l===void 0){x?.remove(),x=void 0;return}let n=t.ownerDocument;if(!n)return;x??=n.createElement(`div`),x.className=`pele pele-error`;let r=yt(l);e?(x.textContent=bt(r),x.title=r,x.setAttribute(`style`,_t),x.parentNode!==t&&t.append(x)):(x.textContent=r,x.removeAttribute(`title`),x.setAttribute(`style`,vt),t.replaceChildren(x))},C=e=>{l=e,S(),a.onError?.(e)},w=()=>{if(_||v)return;let e=lt(t).filter(e=>e.status===`loading`);e.length!==0&&(_=!0,pt(e,new WeakRef(R)))},T=()=>{_=!1,g=!0,M()},E=(e,n=!e)=>{let r=Z(t).getComputedStyle(t),i=t.firstElementChild??null,f={fonts:p,natural:u,adapts:m,drawnFor:h,stale:g},_;try{if(e&&(p=ct(r,i),g=t.isConnected===!1),_=y(r,e),n&&_.svg===d?.svg){e&&(s=o),c&&l!==void 0&&(l=void 0,S());return}b(_.svg)}catch(e){throw{fonts:p,natural:u,adapts:m,drawnFor:h,stale:g}=f,e}if(e&&(s=o),e&&!i&&t.firstElementChild){let e=ct(r,t.firstElementChild);if(e.family!==p.family||e.mono!==p.mono){let t={fonts:p,natural:u,adapts:m,drawnFor:h};p=e;try{let e=y(r,!0);b(e.svg),_=e}catch{({fonts:p,natural:u,adapts:m,drawnFor:h}=t)}}}d=_,c&&(l=void 0),S(),D?.refresh(),w(),a.onRender?.(_)},D,O=!1,k=()=>{let e=a.zoom??`auto`;e!==O&&(D?.destroy(),O=e,D=e===!1?void 0:st(t,typeof e==`object`?e:{always:e===!0},!1))},A=()=>t.isConnected===!1||!(t.clientWidth>0),j=()=>t.isConnected!==!1&&!(t.clientWidth>0),M=()=>{if(v||(L(),!o||A()))return;let e=Z(t).getComputedStyle(t),n=ct(e,t.firstElementChild??null);try{if(g||n.family!==p.family||n.mono!==p.mono)E(!0,!0);else if(m!==!1&&a.maxWidth===void 0){let n=$e(t,e);n!==h&&n!==d?.width&&E(!1)}}catch(e){g=!1,c&&(l=e),o!==s&&(o=s,c=!1),S(),a.onError?.(e)}D?.resized(),w()},N,P,F,I=()=>{F!==void 0&&N?.cancelAnimationFrame(F),F=void 0},L=()=>{let e=Z(t);e!==N&&(P?.disconnect(),I(),N=e,P=e.ResizeObserver?new e.ResizeObserver(()=>{if(F===void 0){if(!e.requestAnimationFrame)return M();F=e.requestAnimationFrame(()=>{F=void 0,M()})}}):void 0,P?.observe(t))},R={get result(){return d},get source(){return i},get error(){return l},get zoom(){return D},update(t,n=a){let r=!c||t!==i||n.limit!==a.limit||n.maxEdges!==a.maxEdges||n.config!==a.config;i=t,a=n;let l=o;if(r)try{l=e.parse(t,n)}catch(e){c=!1,C(e),k();return}let u=d;if(o=l,c=!0,j())g=!0,k();else{try{E(!0)}catch(e){if(d!==u)throw k(),e;o=s,c=!1,C(e)}k()}},refresh:M,destroy(){v=!0,P?.disconnect(),P=void 0,I(),N=void 0,D?.destroy(),ft.delete(R),mt.get(t)===R&&mt.delete(t)}};ft.set(R,T);try{o=e.parse(n,r),c=!0,E(!0)}catch(e){if(d)throw e;o=s,c=!1,C(e)}return k(),L(),mt.set(t,R),R}var St=new Map;function Ct(...e){for(let t of e)St.set(t.type,t)}function wt(e){return St.has(e)}var Tt=5e4,Et=4e6,Dt=5e3;function Ot(e){try{return e()}catch(e){throw e instanceof RangeError?new l(`Diagram is nested too deeply.`,`limit`):e}}function kt(e,t){try{return t()}catch(t){if(t instanceof RangeError)throw new l(`Diagram is nested too deeply.`,`limit`,e);if(t instanceof l){t.type??=e.type,t.mermaidType??=e.mermaidType;let n=D(t.message);n!==t.message&&(t.stack=t.stack?.replace(t.message,()=>n),t.message=n),t.snippet=D(t.snippet)}throw t}}var At=new WeakMap;function jt(e,t=Tt,n=Dt,r){if(e.length>t)throw new l(`Diagram source is longer than the limit of ${t} characters.`,`limit`);let i=Ke(e),a=Ne(i.text);if(a===null)throw new l(`No diagram type detected for the given text.`,`unsupported-diagram`);let o=St.get(a.type);if(o===void 0)throw new l(`Diagram type "${a.type}" is not supported yet.`,`unsupported-diagram`,a);let s=r?{...r,...i.config}:i.config,c=o.keepComments===!0,u=Qe(c?i.withComments:i.text)+`
|
|
44
44
|
`,d=kt(a,()=>m({parsed:u,find:Mt(e,c)},()=>o.parse(u,s,i.title,i.lineOffset,{maxEdges:n})));return{...a,diagram:o,model:d,config:s}}function Mt(e,t){let n,r=``;return i=>{if(n===void 0){n=[];let i=Ke(e,n);Qe(t?i.withComments:ze(i.withComments,n),n),r=Be(e)+`
|
|
45
|
-
`}return[r,f(n,i)]}}function Nt(e,t){if(typeof e==`string`)return jt(e,t.limit,t.maxEdges,t.config);let n=At.get(e);if(n===void 0)throw TypeError(`render() takes diagram text or a model that parse() returned.`);return n}function $(e){return Ne(Ke(e).text)?.type??null}function Pt(e){try{let t=$(e);return t!==null&&St.has(t)}catch{return!1}}function Ft(e,t={}){return Ot(()=>{let n=jt(e,t.limit,t.maxEdges,t.config),r=n.model;return Object.defineProperty(r,"mermaidType",{value:n.mermaidType,enumerable:!0}),At.set(r,n),r})}function It(e,t={}){return Ot(()=>{let{type:n,mermaidType:r,diagram:i,model:a,config:o}=Nt(e,t),s=o[i.section??n],c=typeof s==`object`&&!!s&&!Array.isArray(s)&&s.useMaxWidth===!1,u=t.responsive??!c,d=t.icons,f=d&&(e=>d(O(e))),p=kt({type:n,mermaidType:r},()=>F(i.math?t.math:void 0,()=>j(f,()=>i.render(a,o,{...t,responsive:u,icons:f})))),m=t.outputLimit??Et;if(p.svg.length>m)throw new l(`Diagram output is longer than the limit of ${m} characters.`,`limit`,{type:n,mermaidType:r});for(let e of p.links)e.id=O(e.id);return{type:n,mermaidType:r,...p}})}function Lt(e,t,n={}){return xt({parse:Ft,render:It},e,t,n)}var Rt=e({PeleError:()=>l,detectType:()=>$,enableZoom:()=>ot,forgetTextWidths:()=>he,load:()=>Vt,mount:()=>Lt,mountAsync:()=>Ut,parse:()=>Ft,register:()=>Ct,registered:()=>wt,render:()=>It,renderAsync:()=>Ht,supports:()=>Pt}),zt=new Map([[`flowchart`,()=>t(()=>import(`./
|
|
45
|
+
`}return[r,f(n,i)]}}function Nt(e,t){if(typeof e==`string`)return jt(e,t.limit,t.maxEdges,t.config);let n=At.get(e);if(n===void 0)throw TypeError(`render() takes diagram text or a model that parse() returned.`);return n}function $(e){return Ne(Ke(e).text)?.type??null}function Pt(e){try{let t=$(e);return t!==null&&St.has(t)}catch{return!1}}function Ft(e,t={}){return Ot(()=>{let n=jt(e,t.limit,t.maxEdges,t.config),r=n.model;return Object.defineProperty(r,"mermaidType",{value:n.mermaidType,enumerable:!0}),At.set(r,n),r})}function It(e,t={}){return Ot(()=>{let{type:n,mermaidType:r,diagram:i,model:a,config:o}=Nt(e,t),s=o[i.section??n],c=typeof s==`object`&&!!s&&!Array.isArray(s)&&s.useMaxWidth===!1,u=t.responsive??!c,d=t.icons,f=d&&(e=>d(O(e))),p=kt({type:n,mermaidType:r},()=>F(i.math?t.math:void 0,()=>j(f,()=>i.render(a,o,{...t,responsive:u,icons:f})))),m=t.outputLimit??Et;if(p.svg.length>m)throw new l(`Diagram output is longer than the limit of ${m} characters.`,`limit`,{type:n,mermaidType:r});for(let e of p.links)e.id=O(e.id);return{type:n,mermaidType:r,...p}})}function Lt(e,t,n={}){return xt({parse:Ft,render:It},e,t,n)}var Rt=e({PeleError:()=>l,detectType:()=>$,enableZoom:()=>ot,forgetTextWidths:()=>he,load:()=>Vt,mount:()=>Lt,mountAsync:()=>Ut,parse:()=>Ft,register:()=>Ct,registered:()=>wt,render:()=>It,renderAsync:()=>Ht,supports:()=>Pt}),zt=new Map([[`flowchart`,()=>t(()=>import(`./Cl5gQm2e.js`).then(e=>e.flowchart),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)],[`pie`,()=>t(()=>import(`./UDPiRmKc.js`).then(e=>e.pie),__vite__mapDeps([12,2,3,13]),import.meta.url)],[`er`,()=>t(()=>import(`./CdmC_l9F.js`).then(e=>e.er),__vite__mapDeps([14,2,3,4,5,7,15,9,10]),import.meta.url)],[`mindmap`,()=>t(()=>import(`./B-DzK7Gb.js`).then(e=>e.mindmap),__vite__mapDeps([16,2,3,17,5,6]),import.meta.url)],[`kanban`,()=>t(()=>import(`./DCZYeMlH.js`).then(e=>e.kanban),__vite__mapDeps([18,2,3,17,5,7]),import.meta.url)],[`timeline`,()=>t(()=>import(`./Bb_N98K9.js`).then(e=>e.timeline),__vite__mapDeps([19,20,2,21,3,4]),import.meta.url)],[`journey`,()=>t(()=>import(`./BWE_HS0c.js`).then(e=>e.journey),__vite__mapDeps([22,20,2,21,3]),import.meta.url)],[`class`,()=>t(()=>import(`./CdY1G_wk.js`).then(e=>e.classDiagram),__vite__mapDeps([23,2,3,4,5,6,7,15,8,9,10]),import.meta.url)],[`quadrantChart`,()=>t(()=>import(`./ZwM5k8r0.js`).then(e=>e.quadrantChart),__vite__mapDeps([24,2,3,25]),import.meta.url)],[`xychart`,()=>t(()=>import(`./TanDZqdf.js`).then(e=>e.xychart),__vite__mapDeps([26,2,3,25]),import.meta.url)],[`state`,()=>t(()=>import(`./CFf_dAzX.js`).then(e=>e.state),__vite__mapDeps([27,2,3,4,5,6,7,10]),import.meta.url)],[`gantt`,()=>t(()=>import(`./CzYPMYd4.js`).then(e=>e.gantt),__vite__mapDeps([28,2,3,7]),import.meta.url)],[`architecture`,()=>t(()=>import(`./Ct_EK1xu.js`).then(e=>e.architecture),__vite__mapDeps([29,2,3,4,13]),import.meta.url)],[`requirement`,()=>t(()=>import(`./BiATTH-R.js`).then(e=>e.requirement),__vite__mapDeps([30,2,3,4,5,10]),import.meta.url)],[`sankey`,()=>t(()=>import(`./B35sQTcK.js`).then(e=>e.sankey),__vite__mapDeps([31,2,3]),import.meta.url)],[`packet`,()=>t(()=>import(`./CryuQgNh.js`).then(e=>e.packet),__vite__mapDeps([32,2,3,13,33,34]),import.meta.url)],[`radar`,()=>t(()=>import(`./CMIt1Ma8.js`).then(e=>e.radar),__vite__mapDeps([35,2,3,13]),import.meta.url)],[`treemap`,()=>t(()=>import(`./DjUnonHY.js`).then(e=>e.treemap),__vite__mapDeps([36,2,3,13,33]),import.meta.url)],[`info`,()=>t(()=>import(`./C5Z-Y7Lu.js`).then(e=>e.info),__vite__mapDeps([37,2,13]),import.meta.url)],[`sequence`,()=>t(()=>import(`./DrVtdHUW.js`).then(e=>e.sequence),__vite__mapDeps([38,2,3,4,5,34]),import.meta.url)],[`gitGraph`,()=>t(()=>import(`./D6sVhEz3.js`).then(e=>e.gitGraph),__vite__mapDeps([39,2,21,3,13]),import.meta.url)],[`c4`,()=>t(()=>import(`./Bj-5n5Pb.js`).then(e=>e.c4),__vite__mapDeps([40,2,3,4,6,7,34]),import.meta.url)],[`block`,()=>t(()=>import(`./Cf-5I5_6.js`).then(e=>e.block),__vite__mapDeps([41,2,3,4,5,6]),import.meta.url)],[`railroad`,()=>t(()=>import(`./Djr0h_v1.js`).then(e=>e.railroad),__vite__mapDeps([42,2,3,13]),import.meta.url)],[`agentflow`,()=>t(()=>import(`./BhEqJU15.js`).then(e=>e.agentflow),__vite__mapDeps([43,2,3,4,6,7,8,9,10,11]),import.meta.url)],[`treeView`,()=>t(()=>import(`./BqipEJXw.js`).then(e=>e.treeView),__vite__mapDeps([44,2,3,13,34,45]),import.meta.url)],[`cynefin`,()=>t(()=>import(`./BT_btfh0.js`).then(e=>e.cynefin),__vite__mapDeps([46,2,4,13]),import.meta.url)],[`wardley`,()=>t(()=>import(`./BK31dpt6.js`).then(e=>e.wardley),__vite__mapDeps([47,2,3,4,13,45]),import.meta.url)],[`eventmodeling`,()=>t(()=>import(`./PsfIQCJ1.js`).then(e=>e.eventmodeling),__vite__mapDeps([48,2,3,4,13,34,45]),import.meta.url)],[`usecase`,()=>t(()=>import(`./DHJ8FcFD.js`).then(e=>e.usecase),__vite__mapDeps([49,2,3,4,5,9,10]),import.meta.url)],[`venn`,()=>t(()=>import(`./DRcTlHZP.js`).then(e=>e.venn),__vite__mapDeps([50,2]),import.meta.url)],[`ishikawa`,()=>t(()=>import(`./DFuPQaNa.js`).then(e=>e.ishikawa),__vite__mapDeps([51,2,3,4,34]),import.meta.url)],[`swimlane`,()=>t(()=>import(`./BvPxdlBc.js`).then(e=>e.swimlane),__vite__mapDeps([52,2,4,1,3,5,6,7,8,9,10,11]),import.meta.url)]]),Bt=new Map;function Vt(e){if(e===null)return Promise.resolve(!1);if(wt(e))return Promise.resolve(!0);let t=Bt.get(e);if(t===void 0){let n=zt.get(e);if(n===void 0)return Promise.resolve(!1);t=n().then(e=>(Ct(e),!0),t=>{throw Bt.delete(e),t}),Bt.set(e,t)}return t}async function Ht(e,t={}){let n=null;try{n=$(e)}catch{}return await Vt(n),It(e,t)}async function Ut(e,t,n={}){let r=null;try{r=$(t)}catch{}return await Vt(r),Lt(e,t,n)}export{l as PeleError,i as _,h as a,o as b,u as c,O as d,$ as detectType,ot as enableZoom,M as f,he as forgetTextWidths,c as g,n as h,f as i,ee as l,Vt as load,R as m,Lt as mount,Ut as mountAsync,je as n,g as o,I as p,Ft as parse,D as r,Ct as register,wt as registered,It as render,Ht as renderAsync,_ as s,Pt as supports,Rt as t,me as u,r as v,s as x,a as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e}from"
|
|
1
|
+
import{h as e}from"./CMikI1NP.js";function t(e,t){let n=e.indexOf(`
|
|
2
2
|
`,t);return n===-1?e.length:n}function n(e,t,n){for(let r=0;r<n.length;r++)if((e.charCodeAt(t+r)|32)!==n.charCodeAt(r))return!1;return!0}function r(n,r){let i=n.length,a=r;for(;a<i;){let r=n.charCodeAt(a);if(r===37&&n.charCodeAt(a+1)!==123)a=t(n,a);else{if(r===10)return a;if(e(r))do a++;while(a<i&&e(n.charCodeAt(a)));else if(r===35)a=t(n,a);else return a}}return a}function i(t,n){let r=n;for(;e(t.charCodeAt(r));)r++;return r}function a(e,r,a,o){let s=n(e,r,`accdescr`);if(!s&&!n(e,r,`acctitle`))return r;let c=e.length,l=i(e,r+8),u=e.charCodeAt(l),d=(t,n,r)=>{a.types.push(t),a.texts.push(e.slice(n,r)),a.starts.push(n)};if(u===58){l=i(e,l+1);let n=t(e,l);return d(s?o+2:o,r,l),d(s?o+3:o+1,l,n),n}if(!s||u!==123)return r;for(l=i(e,l+1);e.charCodeAt(l)!==125;){let t=e.indexOf(`}`,l);if(t===-1&&(t=c),d(o+4,l,t),l===c)return c;l=t}return l+1}export{a as i,r as n,t as r,n as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e}from"
|
|
1
|
+
import{s as e}from"./CMikI1NP.js";var t=new WeakMap;function n(e){let n=e.map((e,t)=>t),r=[];for(let t=0;t<128;t++){let i=String.fromCharCode(t);r.push(n.filter(t=>{let{pattern:n,first:r}=e[t];return typeof n==`string`?n[0]===i:r===void 0||r.includes(i)}))}let i={starting:r,every:n,longer:e.map(t=>t.longer?.map(t=>e.indexOf(t)))};return t.set(e,i),i}function r(r,i,a){let o=[],s=[],c=[],l=new Uint8Array(i.length),{starting:u,every:d,longer:f}=t.get(i)??n(i),p=[],m=r.length,h=(e,t)=>{if(l[e])return-1;let n=i[e];if(n.match!==void 0)return n.match(r,t);if(n.scanner!==void 0)return(p[e]??=n.scanner())(r,t);let a=n.pattern;return typeof a==`string`?r.startsWith(a,t)?t+a.length:-1:(a.lastIndex=t,a.test(r)?a.lastIndex:(n.opener!==void 0&&(n.opener.lastIndex=t,n.opener.test(r)&&(l[e]=1)),-1))},g=0;n:for(;g<m;){let t=r.charCodeAt(g);for(let e of t<128?u[t]:d){let t=h(e,g);if(t<=g)continue;let n=e,r=f[e];if(r!==void 0)for(let e of r){let r=h(e,g);if(r>t){n=e,t=r;break}}i[n].hidden||(o.push(n),s.push(g),c.push(t)),g=t;continue n}throw e(a,r,g,``,!0)}return o.push(-1),s.push(m),c.push(m),{kinds:o,starts:s,ends:c,src:r}}var i={name:`ACC_DESCR`,pattern:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/y,first:` a`},a={name:`ACC_TITLE`,pattern:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/y,first:` a`},o={name:`TITLE`,pattern:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/y,first:` t`},s={name:`STRING`,pattern:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/y,first:`"'`},c={name:`NEWLINE`,pattern:/\r?\n/y,first:`\r
|
|
2
2
|
`},l={name:`WHITESPACE`,pattern:/[\t ]+/y,hidden:!0,first:` `},u={name:`YAML`,pattern:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/y,hidden:!0,opener:/---[\t ]*\r?\n/y,first:`-`},d={name:`DIRECTIVE`,pattern:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/y,hidden:!0,opener:/[\t ]*%%{/y,first:` %`},f={name:`SINGLE_LINE_COMMENT`,pattern:/[\t ]*%%[^\n\r]*/y,first:` %`,hidden:!0};function p(e){return{name:e,pattern:RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)+`(?:(?=%%)|(?!\\S))`,`y`),first:e[0]}}var m=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,h=/accTitle[\t ]*:([^\n\r]*)/,g=/title([\t ][^\n\r]*|)/;function _(e){return e.trim().replace(/[\t ]{2,}/gm,` `)}function v(e){return _(g.exec(e)[1])}function y(e){return _(h.exec(e)[1])}function b(e){let t=m.exec(e);return t[1]===void 0?t[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,`
|
|
3
3
|
`):_(t[1])}var x=new Map([[`b`,`\b`],[`f`,`\f`],[`n`,`
|
|
4
4
|
`],[`r`,`\r`],[`t`,` `],[`v`,`\v`],[`0`,`\0`]]);function S(e){if(!e.includes(`\\`))return e.slice(1,-1);let t=``;for(let n=1;n<e.length-1;n++){let r=e[n];if(r===`\\`){let r=e[++n];t+=x.get(r)??r}else t+=r}return t}var C=class{constructor(e,t,n){this.tokens=e,this.types=t,this.diagram=n,this.kinds=e.kinds}tokens;types;diagram;i=0;kinds;get kind(){return this.kinds[this.i]}text(e=this.i){return this.tokens.src.slice(this.tokens.starts[e],this.tokens.ends[e])}take(){return this.text(this.i++)}accept(e){return this.kinds[this.i]===e&&(this.i++,!0)}expect(e){return this.kinds[this.i]!==e&&this.fail(`token of type '${this.types[e].name}'`),this.take()}fail(t){let n=this.kind===-1?`end of input`:`\`${this.text()}\``;throw e(this.diagram,this.tokens.src,this.tokens.starts[this.i],`Expecting ${t} but found ${n}.`)}};export{i as a,b as c,v as d,S as f,y as g,C as h,p as i,c as l,s as m,r as n,d as o,o as p,u as r,f as s,a as t,l as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,d as r,i,o as a,r as o,s,u as c,v as l,x as u}from"./
|
|
1
|
+
import{_ as e,a as t,b as n,d as r,i,o as a,r as o,s,u as c,v as l,x as u}from"./C2npZzkn.js";import{a as d,o as f,t as p}from"./DciMwFJ1.js";import{a as m,i as h,l as g,s as _}from"./BXBhaEho.js";import{n as v}from"./DDAG55ce.js";import{n as y}from"./BA78_vo5.js";import{o as b,t as ee}from"./DKqMzyyE.js";import{t as x}from"./BZmnMkFw.js";import{t as S}from"./D6QVYUu9.js";import{i as te,n as ne,r as re,t as ie}from"./BCGaqnao.js";import{i as ae,n as oe,r as se,t as C}from"./D1LK3xRu.js";import{_ as w,d as T,g as E,h as D,s as O,u as ce}from"./CMikI1NP.js";function k(e){return e===`#`||e===`+`||e===`~`||e===`-`}var A=class{id=``;memberType;visibility=``;classifier=``;parameters=``;returnType=``;constructor(e,t){this.memberType=t,(t!==`method`||!this.parseMethod(e))&&this.parseAttribute(e),this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim()}parseMethod(e){let t=e.length;for(let n=0;n<t;){let r=n;for(;r<t&&!w(e.charCodeAt(r));)r++;let i=r-1;for(;i>n&&e.charCodeAt(i)!==41;)i--;let a=i-1;for(;a>n&&e.charCodeAt(a)!==40;)a--;if(a>n){let r=e[n],o=k(r)&&a>n+1;o&&(this.visibility=r),this.id=e.slice(o?n+1:n,a),this.parameters=e.slice(a+1,i).trim();let s=i+1,c=``;if(s<t){let t=e[s];(t===`$`||t===`*`||t.trim()===``)&&(c=t.trim(),s++)}let l=s;for(;l<t&&!w(e.charCodeAt(l));)l++;if(this.returnType=e.slice(s,l).trim(),c===``){let e=this.returnType.slice(-1);(e===`$`||e===`*`)&&(c=e,this.returnType=this.returnType.slice(0,-1))}return this.classifier=c,!0}n=r+1}return this.memberType=`attribute`,!1}parseAttribute(e){let t=e.slice(0,1),n=e.slice(-1);k(t)&&(this.visibility=t),(n===`$`||n===`*`)&&(this.classifier=n),this.id=e.substring(this.visibility===``?0:1,this.classifier===``?e.length:e.length-1)}getDisplayDetails(){let e=this.visibility+x(this.id);return this.memberType===`method`&&(e+=`(${x(this.parameters.trim())})`,this.returnType&&(e+=` : `+x(this.returnType))),{displayText:e.trim(),cssStyle:this.parseClassifier()}}parseClassifier(){return this.classifier===`*`?`font-style:italic;`:this.classifier===`$`?`text-decoration:underline;`:``}},j={LINE:0,DOTTED_LINE:1},M={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},N=`classId-`;function P(e){let t=e.indexOf(`~`);if(t<=0)return{className:e,type:``};let n=e.indexOf(`~`,t+1);return{className:e.slice(0,t),type:e.slice(t+1,n===-1?e.length:n)}}function le(e){let t=e.charCodeAt(0);return P(t>=48&&t<=57?N+e:e).className}var F=class{type=`class`;lineType=j;relationType=M;direction=`TB`;classes=new Map;relations=[];notes=new Map;namespaces=new Map;interfaces=[];styleClasses=new Map;title;accTitle;accDescr;namespaceStack=[];withCssClass=new Map;addClass(e){let{className:t,type:n}=P(e);if(this.classes.has(t))return;let r={id:t,type:n,label:t,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[]};this.classes.set(t,r),this.tag(r,`default`)}tag(e,t){let n=this.withCssClass.get(t);n?n.add(e):this.withCssClass.set(t,new Set([e]))}ensure(e){return this.addClass(e),this.classes.get(P(e).className)}setClassLabel(e,t){this.ensure(e).label=t}addRelation(e){let{type1:t,type2:n}=e.relation;t===M.LOLLIPOP&&n===`none`?(this.addClass(e.id2),e.id1=this.addInterface(e.id1,e.id2)):n===M.LOLLIPOP&&t===`none`?(this.addClass(e.id1),e.id2=this.addInterface(e.id2,e.id1)):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=P(e.id1).className,e.id2=P(e.id2).className,e.relationTitle1=e.relationTitle1.trim(),e.relationTitle2=e.relationTitle2.trim(),this.relations.push(e)}addInterface(e,t){let n=`interface${this.interfaces.length}`;return this.interfaces.push({id:n,label:e,classId:t}),n}addAnnotation(e,t){this.ensure(e).annotations.push(t)}addMember(e,t){let n=this.ensure(e);if(typeof t!=`string`)return;let r=t.trim();if(r.startsWith(`<<`)&&r.endsWith(`>>`))n.annotations.push(r.substring(2,r.length-2));else if(r.indexOf(`)`)>0){let e=new A(r,`method`);(e.memberType===`method`?n.methods:n.members).push(e)}else r&&n.members.push(new A(r,`attribute`))}addMembers(e,t){if(Array.isArray(t)){t.reverse();for(let n of t)this.addMember(e,n)}}addNote(e,t){let n=this.notes.size,r=`note${n}`;return this.notes.set(r,{id:r,class:t,text:e,index:n}),r}cleanupLabel(e){return(e.startsWith(`:`)?e.substring(1):e).trim()}setCssClass(e,t){for(let n of e.split(`,`)){let e=this.classes.get(le(n));if(e!==void 0){e.cssClasses+=` `+t;for(let n of t.split(` `))this.tag(e,n)}}}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);if(e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),!t)continue;for(let n of t)n.includes(`color`)&&e.textStyles.push(n.replace(`fill`,`bgFill`)),e.styles.push(n);let r=this.withCssClass.get(n);if(r===void 0)continue;let i=t.flatMap(e=>e.split(`,`));for(let e of r)for(let t of i)e.styles.push(t)}}setTooltip(e,t){if(t!==void 0)for(let n of e.split(`,`)){let e=this.classes.get(P(n).className);e&&(e.tooltip=t)}}setLink(e,t,n){let r=T(t).trim();for(let t of e.split(`,`)){let e=this.classes.get(le(t));e&&(e.link=r?b(r):void 0,e.linkTarget=typeof n==`string`?n:`_blank`)}this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){for(let t of e.split(`,`)){let e=this.classes.get(P(t).className);e&&(e.haveCallback=!0)}this.setCssClass(e,`clickable`)}setDirection(e){this.direction=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}addNamespace(e,t){let n=this.namespaceStack[this.namespaceStack.length-1],r=n?`${n}.${e}`:e;this.namespaceStack.push(r);let i=this.namespaces.get(r);if(i)return i.explicit=!0,t&&(i.label=t),r;let a=n||void 0,o=n?n.length+1:0;for(;;){let e=r.indexOf(`.`,o),n=e===-1,i=n?r:r.slice(0,e),s=this.namespaces.get(i);if(s===void 0){let c=r.slice(o,n?r.length:e);s={id:i,label:n&&t?t:c,classes:new Map,notes:new Map,children:new Map,parent:a,explicit:n},this.namespaces.set(i,s)}else n&&(s.explicit=!0);let c=a?this.namespaces.get(a):void 0;if(c&&(c.children.has(i)||c.children.set(i,s),s.parent??=a),n)return r;a=i,o=e+1}}popNamespace(){this.namespaceStack.pop()}addClassesToNamespace(e,t,n){let r=this.namespaces.get(e);if(r!==void 0){for(let n of t){let{className:t}=P(n),i=this.classes.get(t);i!==void 0&&(i.parent=e,r.classes.set(t,i))}for(let t of n){let n=this.notes.get(t);n!==void 0&&(n.parent=e,r.notes.set(t,n))}}}setCssStyle(e,t){let n=this.classes.get(e);if(t&&n)for(let e of t)for(let t of e.split(`,`))n.styles.push(t)}},ue=`$end.INVALID.CLASS_DIAGRAM.NEWLINE.EOF.SQS.STR.SQE.DOT.GENERICTYPE.LABEL.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.STRUCT_START.STRUCT_STOP.NAMESPACE.STYLE_SEPARATOR.ANNOTATION_START.ANNOTATION_END.CLASS.MEMBER.NOTE_FOR.NOTE.CLASSDEF.ALPHA.COMMA.direction_tb.direction_bt.direction_rl.direction_lr.AGGREGATION.EXTENSION.COMPOSITION.DEPENDENCY.LOLLIPOP.LINE.DOTTED_LINE.CALLBACK.LINK.LINK_TARGET.CLICK.CALLBACK_NAME.CALLBACK_ARGS.HREF.STYLE.CSSCLASS.COLON.BRKT.PCT.MINUS.UNICODE_TEXT.BQUOTE_STR.EDGE_STATE.EOF_IN_STRUCT.OPEN_IN_STRUCT.PLUS.EQUALS.PUNCTUATION`.split(`.`),de=[4,6,4,9,44,45,12,14,15,4,56,4,56],fe=[/.*direction\s+TB[^\n]*/y,/.*direction\s+BT[^\n]*/y,/.*direction\s+RL[^\n]*/y,/.*direction\s+LR[^\n]*/y],I=/[\n\r\u2028\u2029]/g;function L(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=e.indexOf(`direction`),l=-1,u=0,d=(t,a,o)=>(n.push(t),r.push(e.slice(a,o)),i.push(a),s=o,!0),f=e=>{a.push(o),o=e},p=()=>{a.length>0&&(o=a.pop())},m=t=>e.startsWith(t,s)&&!E(e.charCodeAt(s+t.length)),h=n=>{for(;n<t&&D(e.charCodeAt(n));)n++;return n},g=n=>{let r=e.indexOf(n,s);return r===-1?t:r},_=n=>{let r=s,i=-1;for(let n=e.charCodeAt(r);r<t&&D(n);n=e.charCodeAt(++r))n===10&&(i=r);i<0?s=r:(n&&p(),d(3,s,i+1))},v=t=>{switch(t){case 99:if(m(`cssClass`))return d(48,s,s+8);if(m(`callback`))return d(40,s,s+8);if(m(`click`))return d(43,s,s+5);break;case 108:if(m(`link`))return d(41,s,s+4);break;case 110:if(m(`note for`))return d(24,s,s+8);if(m(`note`))return d(25,s,s+4);break;case 60:if(e.charCodeAt(s+1)===60)return d(20,s,s+2);break;case 62:if(e.charCodeAt(s+1)===62)return d(21,s,s+2);break;case 104:if(m(`href`))return d(46,s,s+4)}return!1},y=n=>{if(v(n))return!0;let r=e.charCodeAt(s+1);switch(n){case 34:return f(1),s++,!0;case 126:return f(3),s++,!0;case 96:return f(2),s++,!0;case 95:if(m(`_self`))return d(42,s,s+5);if(m(`_blank`))return d(42,s,s+6);if(m(`_parent`))return d(42,s,s+7);if(m(`_top`))return d(42,s,s+4);break;case 60:return r===124?d(34,s,s+2):d(36,s,s+1);case 124:return r===62&&d(34,s,s+2);case 62:return d(36,s,s+1);case 42:return d(35,s,s+1);case 111:if(!E(r))return d(33,s,s+1);break;case 40:return r===41&&d(37,s,s+2);case 45:return r===45?d(38,s,s+2):d(52,s,s+1);case 46:return r===46?d(39,s,s+2):d(8,s,s+1);case 58:{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===58||t===10||t===59)break;n++}return n>s+1?d(10,s,n):r===58&&e.charCodeAt(s+2)===58&&d(19,s,s+3)}case 43:return d(58,s,s+1);case 37:return d(51,s,s+1);case 61:return d(59,s,s+1);case 91:return d(5,s,s+1);case 93:return d(7,s,s+1);case 33:case 35:case 36:case 38:case 39:case 44:case 63:case 92:case 47:return d(60,s,s+1)}if(E(n)){let t=s+1;for(;E(e.charCodeAt(t));)t++;return d(27,s,t)}return S(n)&&d(53,s,s+1)},b=()=>{if(c===-1||s<u||(c<s&&(c=e.indexOf(`direction`,s)),c===-1)||(l<s&&(I.lastIndex=s,l=I.test(e)?I.lastIndex-1:t),c>=l))return!1;for(let t=0;t<4;t++){let n=fe[t];if(n.lastIndex=s,n.test(e))return d(29+t,s,n.lastIndex)}return u=l,!1},ee=n=>{if(b())return!0;if(D(n))return _(!1),!0;switch(n){case 37:if(e.charCodeAt(s+1)===37){let n=g(`
|
|
3
3
|
`);for(;n<t&&(e.charCodeAt(n)===10||e.charCodeAt(n)===13);)n++;return s=n,!0}break;case 97:{let t=e.startsWith(`accTitle`,s);if(!t&&!e.startsWith(`accDescr`,s))break;let n=h(s+8),r=e.charCodeAt(n);if(r===58)return d(t?11:13,s,h(n+1)),f(t?6:7),!0;if(r===123&&!t)return s=h(n+1),f(8),!0;break}case 99:if(m(`classDiagram-v2`))return d(2,s,s+15);if(m(`classDiagram`))return d(2,s,s+12);if(e.startsWith(`call`,s)&&D(e.charCodeAt(s+4)))return s=h(s+4),f(4),!0;if(m(`classDef`))return d(26,s,s+8);if(m(`class`))return f(9),d(22,s,s+5);break;case 91:if(e.startsWith(`*]`,s+1))return d(55,s,s+3);break;case 115:if(m(`style`))return d(47,s,s+5);break;case 110:if(m(`namespace`))return f(11),d(18,s,s+9);break;case 44:return d(28,s,s+1);case 35:return d(50,s,s+1)}return y(n)||n===58&&d(49,s,s+1)};for(;;){if(s>=t){n.push(de[o]),r.push(``),i.push(t);break}let a=e.charCodeAt(s),c=!0;switch(o){case 0:c=ee(a);break;case 9:D(a)?_(!0):a===125?(p(),p(),d(17,s,s+1)):a===123?(f(10),d(16,s,s+1)):c=y(a);break;case 10:if(a===34)f(1),s++;else if(a===125)p(),d(17,s,s+1);else if(a===91&&e.startsWith(`*]`,s+1))d(55,s,s+3);else if(a===123)d(57,s,s+1);else if(a===10)s++;else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===123||t===125||t===10)break;n++}d(23,s,n)}break;case 11:D(a)?_(!0):a===123?(f(12),d(16,s,s+1)):a===125?p():a===110&&m(`namespace`)?(f(11),d(18,s,s+9)):c=y(a);break;case 12:D(a)?_(!1):a===125?(p(),d(17,s,s+1)):a===110&&m(`namespace`)?(f(11),d(18,s,s+9)):a===91&&e.startsWith(`*]`,s+1)?d(55,s,s+3):a===99&&m(`class`)?(f(9),d(22,s,s+5)):c=y(a);break;case 1:a===34?(p(),s++):d(6,s,g(`"`));break;case 3:if(a===34)f(1),s++;else{if(v(a))break;a===126?(p(),s++):d(9,s,g(`~`))}break;case 2:if(a===34)f(1),s++;else{if(v(a))break;a===126?(f(3),s++):a===96?(p(),s++):d(54,s,g("`"))}break;case 4:if(a===40){let t=h(s+1);p(),e.charCodeAt(t)===41?s=t+1:(f(5),s++)}else d(44,s,g(`(`));break;case 5:a===41?(p(),s++):d(45,s,g(`)`));break;case 6:case 7:d(o===6?12:14,s,g(`
|
|
4
4
|
`)),p();break;case 8:a===125?(p(),s++):d(15,s,g(`}`))}if(!c)return n.push(1),r.push(``),i.push(s),{types:n,texts:r,starts:i}}return n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i}}var R=61,z=new Uint8Array(R);for(let e of[53,27,52])z[e]=1;var pe=new Uint8Array(R);for(let e of[27,49,50,47,51,10])pe[e]=1;var B=new Uint8Array(R);B[33]=1,B[34]=2,B[35]=3,B[36]=4,B[37]=5;var V=`'UNICODE_TEXT', 'NUM', 'ALPHA', 'MINUS', 'BQUOTE_STR'`;function me(e,t){let{types:n,texts:r,starts:i}=L(e),a=0,o=t=>{let r=n[a];throw r===1?O(`class`,e,i[a],``,!0):O(`class`,e,i[a],`Expecting ${t}, got '${ue[r]}'`)},s=e=>(n[a]!==e&&o(`'${ue[e]}'`),r[a++]),c=()=>(z[n[a]]===0&&o(`'UNICODE_TEXT', 'NUM', 'ALPHA', 'MINUS'`),r[a++]),l=e=>{let t=``;for(;;){if(n[a]===54){t+=r[a++];break}z[n[a]]===0&&o(V),t+=r[a++];let e=n[a];if(e===8)t+=`.`,a++;else if(z[e]===0&&e!==54)break}return e&&n[a]===9&&(t+=`~`+r[a++]+`~`),t},u=()=>{a++;let e=s(6);return s(7),e},d=()=>{n[a]!==23&&o(`'STRUCT_STOP', 'MEMBER'`);let e=[];for(;n[a]===23;)e.push(r[a++]);return s(17),e.reverse()},f=()=>{a++;let e=l(!0);switch(t.addClass(e),n[a]===5&&t.setClassLabel(e,u()),n[a]){case 19:{a++;let r=c();t.setCssClass(e,r),n[a]===16&&(a++,t.addMembers(e,d()));break}case 16:a++,n[a]===17?a++:t.addMembers(e,d());break;case 20:{a++;let r=c();s(21),t.addAnnotation(e,r),n[a]===16&&(a++,n[a]===17?a++:t.addMembers(e,d()));break}}return e},p=()=>{if(n[a++]===25)return t.addNote(s(6));let e=l(!0);return t.addNote(s(6),e)},m=()=>{let e=[];for(;;){a++;let r=l(!1),i=n[a]===5?t.addNamespace(r,u()):t.addNamespace(r);s(16),n[a]===3&&a++,e.push({id:i,classes:[],notes:[]});let c=!0;for(;c;){let r=e[e.length-1],i=n[a];if(i===18)break;for(i===22?r.classes.push(f()):i===25||i===24?r.notes.push(p()):o(`'NAMESPACE', 'CLASS', 'NOTE_FOR', 'NOTE'`);;){if(n[a]===3){let e=n[a+1];if(e===18||e===22||e===25||e===24){a++;break}a++}s(17);let r=e.pop();if(t.addClassesToNamespace(r.id,r.classes,r.notes),t.popNamespace(),e.length===0){c=!1;break}}}if(e.length===0)return}},h=()=>{let e=B[n[a]];return e===0?`none`:(a++,e-1)},g=()=>{let e=l(!0),i=n[a];if(i===10){t.addMember(e,t.cleanupLabel(r[a++]));return}let s=`none`;if(i===6)s=r[a++],i=n[a];else if(B[i]===0&&i!==38&&i!==39)return;let c=h();i=n[a],i!==38&&i!==39&&o(`'AGGREGATION', 'EXTENSION', 'COMPOSITION', 'DEPENDENCY', 'LOLLIPOP', 'LINE', 'DOTTED_LINE'`),a++;let u=h(),d=n[a]===6?r[a++]:`none`,f={id1:e,id2:l(!0),relation:{type1:c,type2:u,lineType:i===38?0:1},relationTitle1:s,relationTitle2:d};n[a]===10&&(f.title=t.cleanupLabel(r[a++])),t.addRelation(f)},_=()=>{let e=[];for(;;){pe[n[a]]===0&&o(`'ALPHA', 'NUM', 'COLON', 'UNIT', 'SPACE', 'BRKT', 'STYLE', 'PCT', 'LABEL'`);let t=r[a++];for(;pe[n[a]]===1;)t+=r[a++];if(e.push(t),n[a]!==28)return e;a++}},v=e=>{n[a]===6&&t.setTooltip(e,r[a++])},y=e=>{let i=s(6),o=n[a]===6?r[a++]:void 0;n[a]===42?t.setLink(e,i,r[a++]):t.setLink(e,i),o!==void 0&&t.setTooltip(e,o)},b=()=>{let e=n[a];switch(e){case 53:case 27:case 52:case 54:g();return;case 18:m();return;case 22:f();return;case 23:a++;return;case 20:{a++;let e=c();s(21),t.addAnnotation(l(!0),e);return}case 40:{a++;let e=l(!0);t.setClickEvent(e,s(6)),v(e);return}case 41:a++,y(l(!0));return;case 43:{a++;let e=l(!0);if(n[a]===46){a++,y(e);return}let i=s(44);n[a]===45?t.setClickEvent(e,i,r[a++]):t.setClickEvent(e,i),v(e);return}case 47:{a++;let e=s(27);t.setCssStyle(e,_());return}case 48:{a++;let e=s(6);t.setCssClass(e,s(27));return}case 25:case 24:p();return;case 26:{a++;let e=[s(27)];for(;n[a]===28;)a++,e.push(s(27));t.defineClass(e,_());return}case 29:case 30:case 31:case 32:a++,t.setDirection(e===29?`TB`:e===30?`BT`:e===31?`RL`:`LR`);return;case 11:a++,t.setAccTitle(s(12).trim());return;case 13:a++,t.setAccDescription(s(14).trim());return;case 15:t.setAccDescription(r[a++].trim());return}o(`'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'NAMESPACE', 'ANNOTATION_START', 'CLASS', 'MEMBER', 'NOTE_FOR', 'NOTE', 'CLASSDEF', 'direction_tb', 'CALLBACK', 'LINK', 'CLICK', 'STYLE', 'CSSCLASS', 'ALPHA', 'MINUS', 'BQUOTE_STR'`)},ee=n[a]===2;for(ee&&(a++,s(3));b(),!(n[a]!==3||(a++,n[a]===4||n[a]===0)););ee&&s(4),s(0)}function he(e,t,n,r){let i=Int32Array.from(e,(e,t)=>t),a=e=>{for(;i[e]!==e;)i[e]=i[i[e]],e=i[e];return e},o=(e,t)=>{i[a(e)]=a(t)};for(let t=0;t<e.length;t++)e[t].parent>=0&&o(t,e[t].parent);for(let e of t)o(e.src,e.dst);let s=new Map,c=(e,t,n,r=0,i=0)=>{e.left=Math.min(e.left,t-r/2),e.top=Math.min(e.top,n-i/2),e.right=Math.max(e.right,t+r/2),e.bottom=Math.max(e.bottom,n+i/2)};for(let t=0;t<e.length;t++){let n=a(t),r=s.get(n);r||(r={nodes:[],edges:[],left:1/0,top:1/0,right:-1/0,bottom:-1/0},s.set(n,r));let i=e[t];r.nodes.push(i),c(r,i.x,i.y,i.w,i.h)}if(s.size<2)return;for(let e of t){let t=s.get(a(e.src));t.edges.push(e);for(let n=0;n<e.route.length;n+=3)c(t,e.route[n],e.route[n+1]);e.labelW>0&&c(t,e.labelX,e.labelY,e.labelW,e.labelH)}let l=0,u=0,d=0,f=0,p=1/0,m=-1/0,h=[];for(let e of s.values()){let t=e.right-e.left,i=e.bottom-e.top;l>0&&l+t>n&&(u+=d+r,l=0,d=0),h.push(l-e.left,u-e.top),p=Math.min(p,e.left),m=Math.max(m,e.right),f=Math.max(f,l+t),d=Math.max(d,i),l+=t+r}if(f>=m-p)return;let g=0;for(let e of s.values())oe(e.nodes,e.edges,h[g++],h[g++]);return{width:f,height:u+d}}var H=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`];function U(e){return typeof e==`number`&&H[e]||`none`}function ge(e,t=!0){let n=[],r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=n=>{if(t||n===void 0)return n;let r=[],i=n,a;for(;i;){if(s.has(i)){a=s.get(i);break}let t=e.namespaces.get(i);if(t===void 0)break;if(t.explicit){a=i;break}r.push(i),i=t.parent}for(let e of r)s.set(e,a);return a},l=e=>e===void 0?-1:i.get(e)??-1;for(let r of e.namespaces.values())!t&&!r.explicit||(i.set(r.id,n.length),n.push({id:r.id,label:t?r.label:r.id,isGroup:!0,shape:`rect`,parentId:t?r.parent:void 0,parent:-1}));for(let e of n)e.parent=l(e.parentId);let u=0;for(let t of e.classes.values()){let e=c(t.parent);a.set(t.id,n.length),n.push({id:t.id,label:t.label,isGroup:!1,shape:`classBox`,parentId:e,parent:l(e),classNode:t,colorIndex:u++})}for(let t of e.notes.values()){let e=c(t.parent),i=t.class===void 0?void 0:a.get(t.class);i!==void 0&&r.push({id:`edgeNote${t.index}`,start:t.id,end:n[i].id,source:n.length,target:i,label:void 0,arrowTypeStart:`none`,arrowTypeEnd:`none`,startLabelRight:``,endLabelLeft:``,pattern:`dotted`,classes:`relation`}),n.push({id:t.id,label:t.text,isGroup:!1,shape:`note`,parentId:e,parent:l(e)})}for(let t of e.interfaces){let e=a.get(t.classId);o.set(t.id,n.length),n.push({id:t.id,label:t.label,isGroup:!1,shape:`interface`,parentId:void 0,parent:e===void 0?-1:n[e].parent})}let d=0;for(let t of e.relations){d++;let{type1:e,type2:n}=t.relation,i=e===M.LOLLIPOP&&n===`none`?o:a,s=i===a&&n===M.LOLLIPOP&&e===`none`?o:a;r.push({id:`id_${t.id1}_${t.id2}_${d}`,start:t.id1,end:t.id2,source:i.get(t.id1)??-1,target:s.get(t.id2)??-1,label:t.title,arrowTypeStart:U(e),arrowTypeEnd:U(n),startLabelRight:t.relationTitle1===`none`?``:t.relationTitle1,endLabelLeft:t.relationTitle2===`none`?``:t.relationTitle2,pattern:t.relation.lineType===1?`dashed`:`solid`,classes:`relation`})}return{nodes:n,edges:r}}var W=12,G=16,K=6,q=5;function _e(e){switch(e){case`extension`:return W;case`composition`:case`aggregation`:return G;case`lollipop`:return 2*q;case`dependency`:return m(`arrow_point`)}return 0}function ve(e,t,n,r,i,a){let o=-i,s=r;switch(e){case`extension`:{let e=t-r*W,a=n-i*W;return`<path class="pele-marker" d="M${u(t)},${u(n)}L${u(e+o*K)},${u(a+s*K)}L${u(e-o*K)},${u(a-s*K)}Z" stroke-linejoin="round"/>`}case`composition`:case`aggregation`:{let c=t-r*G/2,l=n-i*G/2,d=K-1;return`<path class="pele-marker" d="M${u(t)},${u(n)}L${u(c+o*d)},${u(l+s*d)}L${u(t-r*G)},${u(n-i*G)}L${u(c-o*d)},${u(l-s*d)}Z" stroke-linejoin="round"${e===`composition`?` fill="${a}"`:``}/>`}case`lollipop`:return`<circle class="pele-marker" cx="${u(t-r*q)}" cy="${u(n-i*q)}" r="${q}"/>`;case`dependency`:return _(`arrow_point`,t,n,r,i,a)}return``}var ye=40,be=16,xe=56,J=20,Se=26,Ce=12,we=8,Te=6,Ee=10,De=64,Oe=8,ke=`var(--_l)`,Ae=new Set([`_self`,`_blank`,`_parent`,`_top`]);function je(e,t,n){let r=e[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}var Me=[],Ne=[];function Pe(e,t,n){let r=T(e.getDisplayDetails().displayText).trim();return{text:r,width:t.width(r,n,e.classifier===`*`?2:0),classifier:e.classifier}}function Fe(e,t,n){let r=r=>f(n,i=>Ie(e,t,n,r,i));return d(e.direction)?p(n,r):r(!1)}function Ie(d,f,p,m,_){let b=f.class??{},S=ge(d,b.hierarchicalNamespaces!==!1),oe=b.hideEmptyMembersBox===!0,w=p.fontSize??16,E=Math.round(w*.875),D=Math.round(w*.8),O=Math.round(D*1.4),k=p.measurer??ce(p.fontFamily,p.fontFamilyMono),A=p.padding??8,j=(e,t)=>{if(!e.includes(`$$`))return;let n=c(e,!1,k,t,4e3);return n.lines.some(l)?n:void 0},M=e=>e?j(e,D)?.width??k.width(T(e),D,0):0,N=m?`TB`:se(d.direction),P=new Map,le=new Map,F=new Map,ue=e=>{let t=P.get(e);if(t===void 0){let n=s([e]);t=n.shape===``&&n.text===``?``:e.slice(0,e.indexOf(`:`)).trim().toLowerCase(),P.set(e,t)}t!==``&&F.set(t,e)},de=e=>{F.clear();let t=le.get(e.cssClasses);if(t===void 0){for(let t of e.cssClasses.split(` `)){let e=d.styleClasses.get(t);if(e)for(let t of e.styles)for(let e of t.split(`,`))ue(e)}t=[...F],le.set(e.cssClasses,t)}else for(let[e,n]of t)F.set(e,n);for(let t of e.styles)ue(t);return s(F.size===0?Ne:[...F.values()])},fe=new Int32Array(S.nodes.length);for(let e of S.nodes)e.parent>=0&&fe[e.parent]++;let I=new Uint8Array(S.nodes.length);for(let e of S.edges){if(e.source<0||e.target<0)continue;let t=S.nodes[e.source].parent,n=S.nodes[e.target].parent;if(t!==n){for(let e=t;e>=0&&I[e]===0;e=S.nodes[e].parent)I[e]=1;for(let e=n;e>=0&&I[e]===0;e=S.nodes[e].parent)I[e]=1}}let L=[],R=[];S.nodes.forEach((e,t)=>{let n,r;if(e.isGroup){let i=c(e.label,!1,k,w,4e3);n=z(e,i,0,0,w),fe[t]>0?(r=C(0,0),r.isGroup=!0,r.padX=J,r.padTop=i.height>0?i.height+16:J,r.padBottom=J,r.minW=i.width+2*J-12+(I[t]===1&&!_?Math.min(i.width+24,240):0)):(n.w=Math.max(i.width+2*J,80),n.h=i.height+2*J,r=C(n.w,n.h))}else if(e.classNode)n=pe(e,e.classNode),r=C(n.w,n.h);else if(e.shape===`note`){let t=c(e.label,!0,k,E,260);n=z(e,t,Math.max(t.width+2*Ce,40),t.height+2*we,E),r=C(n.w,n.h)}else{let t=c(e.label,!1,k,E,200);n=z(e,t,Math.max(t.width,12)+4,Math.max(t.height,12),E),r=C(n.w,n.h)}r.parent=e.parent,r.seq=t,L.push(n),R.push(r)});function z(e,t,n,r,i){return{node:e,style:s(Ne),label:t,w:n,h:r,loops:0,annotations:Ne,attributes:Me,methods:Me,titleH:0,attributesH:0,fontSize:i}}function pe(e,t){let n=de(t),r=n.fontSize??w,i=Math.round(r*.875),a=Math.round(i*1.5),o=t.type?`<`+x(t.type).replace(/</g,`<`).replace(/>/g,`>`)+`>`:``,s=c(t.label+o,!1,k,r,4e3,1|(n.italic?2:0)),l=t.annotations.length>0?t.annotations.map(e=>j(`«${e.trim()}»`,D)??`«${T(e).trim()}»`):Ne,u=t.members.length>0?t.members.map(e=>Pe(e,k,i)):Me,d=t.methods.length>0?t.methods.map(e=>Pe(e,k,i)):Me,f=s.width,p=0;for(let e of l)f=Math.max(f,typeof e==`string`?k.width(e,D,0):e.width),p+=typeof e==`string`?O:Math.max(O,e.height);for(let e of u)f=Math.max(f,e.width);for(let e of d)f=Math.max(f,e.width);let m=!(oe&&u.length===0&&d.length===0),h=e=>m?e>0?2*Te+e*a:Ee:0,g=2*we+p+Math.max(s.height,Math.round(r*1.5)),_=h(u.length);return{node:e,style:n,label:s,w:Math.max(f+2*Ce,De),h:g+_+h(d.length),loops:0,annotations:l,attributes:u,methods:d,titleH:g,attributesH:_,fontSize:r}}let B=[],V=[],me=[],H=[],U=[],W=new Float64Array(L.length*4),G=(e,t,n)=>{W[e*4+t]++,n>W[e*4+t+1]&&(W[e*4+t+1]=n)};for(let e of S.edges){if(e.source<0||e.target<0)continue;let t=c(e.label,!0,k,E,200),n=M(e.startLabelRight),r=M(e.endLabelLeft);e.source===e.target?(L[e.source].loops++,R[e.source].w+=2*(Se+(t.width>0?t.width+12:0))):(G(e.source,0,n),G(e.target,2,r)),H.push(n),U.push(r),V.push(e),me.push(t),B.push({src:e.source,dst:e.target,minlen:1,labelW:t.width>0?t.width+12:0,labelH:t.height>0?t.height+4:0,route:[],labelX:0,labelY:0})}if(N===`TB`||N===`BT`)for(let e=0;e<L.length;e++){if(!L[e].node.classNode)continue;let t=0;for(let n=0;n<4;n+=2){let r=W[e*4+n],i=W[e*4+n+1];r>1&&(t=Math.max(t,(r-1)*(i>0?i+24:14)+24))}t=Math.min(t,480),t>L[e].w&&(R[e].w+=t-L[e].w,L[e].w=t)}let K=!1;for(let e=0;e<V.length&&!K;e++)K=H[e]>0||U[e]>0;let q=0;if(N===`TB`||N===`BT`){let e=e=>e?Math.max(O,j(e,D)?.height??0):0;for(let t of V)q=Math.max(q,e(t.startLabelRight)+e(t.endLabelLeft)-2*O)}let Fe=ae(R,B,N,{nodeSep:je(b,`nodeSpacing`,ye),edgeSep:be,rankSep:je(b,`rankSpacing`,K?xe+16:xe)+q,portSep:20,apart:!0}),Ie=new Map,Y=[],Le=(e,t,n,r,i)=>{let a=e.route,o=R[n],s=y(a,t,o);if(s<0)return;let c=(o.w-L[n].w)/2;s===1?a[t]-=c:s===3&&(a[t]+=c);let l=s&1,u=a[(t===0?3:t-3)+l],d=u-a[t+l],f={route:a,at:t,toward:u,order:i,room:r,side:s,after:l?d>0:d>=0},p=n*4+s,m=Ie.get(p);return m?m.push(f):Ie.set(p,[f]),f},Re=[],ze=[];for(let e=0;e<B.length;e++){let t=B[e],n=t.src!==t.dst&&t.route.length>=6;Re.push(n?Le(t,0,t.src,H[e],e):void 0),ze.push(n?Le(t,t.route.length-3,t.dst,U[e],e):void 0)}let Be=(e,t,n)=>{for(let r=R[e].parent,i=0;r>=0&&i<1e4;r=R[r].parent,i++){let e=R[r],i=Math.abs(t-e.x),a=Math.abs(n-e.y);if(Math.abs(a-e.h/2)<.5&&i<=e.w/2+.5||Math.abs(i-e.w/2)<.5&&a<=e.h/2+.5)return!0}return!1},Ve=[];for(let[e,t]of Ie){if(t.length<2)continue;let n=e>>2,r=e&1,i=r?L[n].h:L[n].w;t.sort((e,t)=>e.toward-t.toward||e.order-t.order);let a=0;for(let e=0;e+1<t.length;e++){let n=t[e],i=t[e+1],o=r?20:24;n.room>0&&n.after&&(o+=r?O+6:n.room),i.room>0&&!i.after&&(o+=r?O+6:i.room),Ve[e]=o,a+=o}let o=Math.min(1,(i-24)/a);if(o<=0)continue;let s=(r?R[n].y:R[n].x)-a*o/2;for(let e=0;e<t.length;e++){let{route:i,at:a}=t[e],c=a===0?3:-3,l=a+c,u=-1;for(let e=l;e>=0&&e<i.length&&Math.abs(i[e+r]-i[l+r])<.5;e+=c)if(Be(n,i[e],i[e+1])){u=e;break}if(u>=0&&Math.abs(i[l+r]-s)<=24)for(let e=l;e!==u+c;e+=c)i[e+r]=s;i[a+r]=s,s+=Ve[e]*o}}let He=(e,t,n,r)=>{if(t===void 0||n<=0)return;let i=t.side&1,a=r?0:e.length-3,o=a+1-i,s=Math.abs(e[(r?3:a-3)+1-i]-e[o]),c=Math.min(i?n+10:O+6,s*.35);if(c<4)return;let l=[e[a],e[a+1],e[a+2]];l[1-i]+=(t.side===0||t.side===3?-1:1)*c,e.splice(r?3:a,0,l[0],l[1],l[2])};for(let e=0;e<B.length;e++)He(B[e].route,Re[e],H[e],!0),He(B[e].route,ze[e],U[e],!1);let X=0,Z=0,Ue=Fe.width,We=Fe.height,Ge=(e,t,n,r,i,a,o)=>{if(!t)return;let s=j(t,D),c=s?Math.max(O,s.height):O,l=r,u=i;a&1?(l+=(a===3?-1:1)*(5+n/2),u+=(o?1:-1)*(7+c/2)):(l+=(o?1:-1)*(9+n/2),u+=(a===0?-1:1)*(3+c/2)),Y.push({text:T(t),math:s,x:l,y:u,w:n,h:c,parent:e}),X=Math.min(X,l-n/2),Ue=Math.max(Ue,l+n/2),Z=Math.min(Z,u-c/2),We=Math.max(We,u+c/2)},Ke=new Map,qe=new Int32Array(B.length);for(let e=0;e<B.length;e++){let t=B[e],n=V[e],r=t.route;if(t.src===t.dst){let r=Ke.get(t.src)??0;Ke.set(t.src,r+1),qe[e]=r;let i=R[t.src],a=L[t.src],o=i.x+a.w/2,s=Math.min(a.h/2-4,8+r*6);Ge(t.src,n.startLabelRight,H[e],o,i.y-s,1,!1),Ge(t.dst,n.endLabelLeft,U[e],o,i.y+s,1,!0),t.labelX=i.x+a.w/2+Se+r*8+4+t.labelW/2,t.labelY=i.y}else if(r.length>=6){let i=r.length-3,a=Re[e],o=ze[e];Ge(t.src,n.startLabelRight,H[e],r[0],r[1],a?a.side:2,!a||a.after),Ge(t.dst,n.endLabelLeft,U[e],r[i],r[i+1],o?o.side:0,!o||o.after)}}let Je=p.maxWidth;if(Je!==void 0&&Je>0&&Ue-X+2*A>Je){let e=Y.map(e=>({...C(e.w,e.h,e.parent),x:e.x,y:e.y})),t=he(R.concat(e),B,Math.max(1,Je-2*A),je(b,`nodeSpacing`,ye));t&&(Y.forEach((t,n)=>{t.x=e[n].x,t.y=e[n].y}),X=Z=0,Ue=t.width,We=t.height)}let Q=A-X,$=A-Z,Ye=Math.ceil(Ue-X+2*A),Xe=Math.ceil(We-Z+2*A),Ze=[],Qe=new Map;if(S.nodes.length>0&&S.nodes[0].isGroup)for(let e of B)re(Qe,e.route);let $e=``,et=``,tt=``;for(let e=0;e<L.length;e++){let t=L[e],n=R[e],r=t.node,s=n.x+Q,c=n.y+$,l=i(r.id),d=n.isGroup?n.w:t.w,f=n.isGroup?n.h:t.h;if(r.isGroup){let r=n.isGroup?ne(n,t.label.width,Qe,J):n.x,i=c-f/2+8+t.label.height/2,p=` class="pele-cluster-label" fill="var(--_m)"`,m=n.isGroup&&te(n,t.label.width,r,Qe);m&&(et+=ie(t.label,r+Q,i,p,l,S.nodes,e)),$e+=`<g class="pele-cluster pele-namespace" data-id="${l}"><rect x="${u(s-d/2)}" y="${u(c-f/2)}" width="${u(d)}" height="${u(f)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${o}/>`+(m?``:a(t.label,r+Q,i,p))+`</g>`;continue}let m=` transform="translate(${u(s)},${u(c)})"`;if(r.classNode)tt+=nt(t,r.classNode,l,m);else if(r.shape===`note`){let e=d/2,n=-f/2;tt+=`<g class="pele-node pele-note" data-id="${l}"${m}><path d="M${u(-e)},${u(n)}H${u(e-Oe)}L${u(e)},${u(n+Oe)}V${u(-n)}H${u(-e)}Z" fill="var(--_a)" stroke="var(--_b)" stroke-linejoin="round"/><path d="M${u(e-Oe)},${u(n)}V${u(n+Oe)}H${u(e)}" fill="none" stroke="var(--_b)" stroke-linejoin="round"/>`+a(t.label,0,0,` class="pele-label" font-size="${E}"`,p.icons)+`</g>`}else tt+=`<g class="pele-node pele-interface" data-id="${l}"${m}>`+a(t.label,0,0,` class="pele-label" font-size="${E}"`,p.icons)+`</g>`}function nt(e,o,s,c){let{w:l,h:d,style:f}=e,m=-l/2,h=-d/2,g=Math.round(e.fontSize*.875),_=Math.round(g*1.5),v=`<rect x="${u(m)}" y="${u(h)}" width="${u(l)}" height="${u(d)}" fill="var(--_s)" stroke="var(--_b)"${r(f.shape)}/>`,y=h+e.titleH,b=y+e.attributesH;if(d>e.titleH){let e=f.stroke?` style="stroke:${t(f.stroke)}"`:``;v+=`<path class="pele-divider" d="M${u(m)},${u(y)}H${u(-m)}M${u(m)},${u(b)}H${u(-m)}" fill="none" stroke="var(--_b)"${e}/>`}let x=h+we;for(let n of e.annotations)if(typeof n==`string`)v+=`<text class="pele-annotation" x="0" y="${u(x+O/2+D*.35)}" text-anchor="middle" font-size="${D}" fill="var(--_m)">${t(n)}</text>`,x+=O;else{let e=Math.max(O,n.height);v+=a(n,0,x+e/2,` class="pele-annotation" font-size="${D}" fill="var(--_m)"`,p.icons),x+=e}let S=e.fontSize===w?``:` font-size="${u(e.fontSize)}"`;v+=a(e.label,0,(x+y-we)/2,` class="pele-label"${S} font-weight="var(--_hw)"${f.text}`,p.icons);let te=(e,n,r)=>{let i=``,a=r+Te+_/2+g*.35;for(let r of e){let e=r.classifier===`$`?` pele-static"${f.text?f.text.slice(0,-1)+`text-decoration:underline"`:` style="text-decoration:underline"`}`:r.classifier===`*`?` pele-abstract" font-style="italic"${f.text}`:`"${f.text}`;i+=`<text class="pele-member pele-${n}${e} x="${u(m+Ce)}" y="${u(a)}">${t(r.text)}</text>`,a+=_}return i};return(e.attributes.length>0||e.methods.length>0)&&(v+=`<g class="pele-members" font-size="${g}">${te(e.attributes,`attribute`,y)}${te(e.methods,`method`,b)}</g>`),o.tooltip&&(v=`<title>${i(o.tooltip)}</title>`+v),o.link&&(v=ee(v,o.link,o.id,Ze,p,o.linkTarget&&Ae.has(o.linkTarget)?` target="${o.linkTarget}"`:``)),`<g class="pele-node pele-class${n(o.cssClasses.replace(/^default\s?/,``))}" data-id="${s}"${c}>${v}</g>`}let rt=``,it=``;for(let e=0;e<B.length;e++){let t=B[e],n=V[e],r=me[e],a=n.arrowTypeStart,o=n.arrowTypeEnd,s=_e(a),c=_e(o),l;if(t.src===t.dst){let n=R[t.src],r=L[t.src],i=qe[e],a=n.x+Q+r.w/2,o=n.y+$,d=Math.min(r.h/2-4,8+i*6),f=Se+i*8;l={d:`M${u(a+s)},${u(o-d)}C${u(a+f+s)},${u(o-d)} ${u(a+f+c)},${u(o+d)} ${u(a+c)},${u(o+d)}`,sx:a,sy:o-d,sdx:-1,sdy:0,ex:a,ey:o+d,edx:-1,edy:0}}else{let e=t.route;for(let t=0;t<e.length;t+=3)e[t]+=Q,e[t+1]+=$;l=g(e,void 0,s,c)}let d=n.pattern===`dashed`?` stroke-dasharray="6 4"`:n.pattern===`dotted`?` stroke-dasharray="2 4"`:``;if(rt+=`<g class="pele-edge${n.pattern===`dotted`?` pele-note-edge`:` pele-relation`}" data-id="${i(n.id)}"><path d="${l.d}"${d}/>`+ve(a,l.sx,l.sy,l.sdx,l.sdy,ke)+ve(o,l.ex,l.ey,l.edx,l.edy,ke)+`</g>`,r.width>0){let e=t.labelX+Q,i=t.labelY+$;it+=h(n.id,r,e,i,``,p.icons)}}let at=``;for(let e of Y)at+=e.math?a(e.math,e.x+Q,e.y+$,` class="pele-cardinality"`,p.icons):`<text class="pele-cardinality" x="${u(e.x+Q)}" y="${u(e.y+$+D*.35)}" text-anchor="middle">${t(e.text)}</text>`;let ot=v(d.title,k,w,A,Ye,Xe,($e?`<g class="pele-clusters">${$e}</g>`:``)+(rt?`<g class="pele-edges" fill="none" stroke="${ke}" stroke-linecap="round">${rt}</g>`:``)+(et?`<g class="pele-cluster-titles">${et}</g>`:``)+(it?`<g class="pele-edge-labels" font-size="${E}">${it}</g>`:``)+(at?`<g class="pele-cardinalities" font-size="${D}" fill="var(--_m)">${at}</g>`:``)+`<g class="pele-nodes">${tt}</g>`);return{svg:e(`class`,ot.width,ot.height,w,p,d,ot.content),width:ot.width,height:ot.height,links:Ze}}var Y={type:`class`,math:!0,parse(e,t,n){let r=new F;return n&&(r.title=n),me(e,r),r},render:Fe};export{Y as classDiagram};
|