isorite 0.17.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/main.js +1577 -65
  2. package/package.json +4 -1
  3. package/web/_app/immutable/assets/0.i592VXJM.css +1 -0
  4. package/web/_app/immutable/chunks/{2BcU70Iq.js → -_CDfwKC.js} +1 -1
  5. package/web/_app/immutable/chunks/{DrPF-vh8.js → -oRvYXNk.js} +1 -1
  6. package/web/_app/immutable/chunks/0qd6IUbO.js +1 -0
  7. package/web/_app/immutable/chunks/{yy6sD_us.js → 7faei0hL.js} +1 -1
  8. package/web/_app/immutable/chunks/{BNlziJ_1.js → BArcFmbE.js} +3 -3
  9. package/web/_app/immutable/chunks/{NgkOM4d0.js → BF1TezEe.js} +1 -1
  10. package/web/_app/immutable/chunks/{DK9wjWIk.js → BF3mdiSX.js} +1 -1
  11. package/web/_app/immutable/chunks/{BbvUCVY_.js → BezGs1Zj.js} +1 -1
  12. package/web/_app/immutable/chunks/{BjLgp18-.js → BpHE30PI.js} +1 -1
  13. package/web/_app/immutable/chunks/{Ds9L6FPB.js → BtF1frCE.js} +1 -1
  14. package/web/_app/immutable/chunks/{D_xpsaTJ.js → BuNfZSU6.js} +1 -1
  15. package/web/_app/immutable/chunks/{0KrpTYPM.js → BubCsN15.js} +1 -1
  16. package/web/_app/immutable/chunks/{_zY4mrA0.js → BvhVny3O.js} +1 -1
  17. package/web/_app/immutable/chunks/{CcRcjPTM.js → Bvs-JCN-.js} +1 -1
  18. package/web/_app/immutable/chunks/{1W6iRjg5.js → C-F98t31.js} +1 -1
  19. package/web/_app/immutable/chunks/{rv_cF9pp.js → C1OaBy7n.js} +1 -1
  20. package/web/_app/immutable/chunks/{CMN7rSZK.js → C4SqDe8e.js} +1 -1
  21. package/web/_app/immutable/chunks/{BBU5FdEo.js → C74H8jNb.js} +1 -1
  22. package/web/_app/immutable/chunks/{Cn7j5NKi.js → C7bouMY8.js} +1 -1
  23. package/web/_app/immutable/chunks/{vGOSIW7X.js → C8IrXs1w.js} +1 -1
  24. package/web/_app/immutable/chunks/{CwcA6hab.js → CGGjDDVZ.js} +1 -1
  25. package/web/_app/immutable/chunks/{CabmfniL.js → CMAnq3x6.js} +1 -1
  26. package/web/_app/immutable/chunks/{Bx_Vz2qr.js → CMe14KUo.js} +1 -1
  27. package/web/_app/immutable/chunks/{DQJRaTNz.js → CXc9Iibq.js} +1 -1
  28. package/web/_app/immutable/chunks/Cb-KPahQ.js +1 -0
  29. package/web/_app/immutable/chunks/{CpJ4vfn-.js → Cf13Ew0A.js} +1 -1
  30. package/web/_app/immutable/chunks/{CQhfj5-f.js → CkSjC-iE.js} +3 -3
  31. package/web/_app/immutable/chunks/{sBy91tGs.js → Cn8Mg7_E.js} +1 -1
  32. package/web/_app/immutable/chunks/Co7i-dcu.js +1 -0
  33. package/web/_app/immutable/chunks/{1MewxdCy.js → CoeYsgbS.js} +1 -1
  34. package/web/_app/immutable/chunks/{CccIbhmH.js → CqmdC7Q3.js} +2 -2
  35. package/web/_app/immutable/chunks/{DJHLXLij.js → CrqOdm1D.js} +1 -1
  36. package/web/_app/immutable/chunks/{B-04K_Pl.js → CyJXJYoE.js} +1 -1
  37. package/web/_app/immutable/chunks/{CxEu-Di8.js → Cz6kYWmu.js} +1 -1
  38. package/web/_app/immutable/chunks/{ZDjPMhAb.js → CzbFy3_5.js} +1 -1
  39. package/web/_app/immutable/chunks/{yYKJ4mbq.js → D-9suc4b.js} +1 -1
  40. package/web/_app/immutable/chunks/{qfBACIi9.js → D37hxBaz.js} +1 -1
  41. package/web/_app/immutable/chunks/D4nFtMQC.js +1 -0
  42. package/web/_app/immutable/chunks/{CmFzeyfe.js → DNs5kWvM.js} +1 -1
  43. package/web/_app/immutable/chunks/{C2EzU0qX.js → DR5d84Z7.js} +1 -1
  44. package/web/_app/immutable/chunks/{C2QvvHIN.js → DaEL1AOW.js} +1 -1
  45. package/web/_app/immutable/chunks/{BCsFs14H.js → Dazeexma.js} +1 -1
  46. package/web/_app/immutable/chunks/{DqZ4UzUH.js → Dc2_04md.js} +1 -1
  47. package/web/_app/immutable/chunks/{DfLI-CvW.js → Dcjgv4h2.js} +1 -1
  48. package/web/_app/immutable/chunks/{DMpFmiFg.js → DdegnILL.js} +1 -1
  49. package/web/_app/immutable/chunks/{CRbUrapz.js → DgI3Vj5v.js} +1 -1
  50. package/web/_app/immutable/chunks/{fpNFwizw.js → Dgko1xMH.js} +1 -1
  51. package/web/_app/immutable/chunks/DjN194Ef.js +1 -0
  52. package/web/_app/immutable/chunks/{DS7XcdHs.js → DlgOmQ_G.js} +1 -1
  53. package/web/_app/immutable/chunks/{DMTkA0aK.js → DmS5Qyvl.js} +1 -1
  54. package/web/_app/immutable/chunks/{DeazQJkV.js → DqnDX3G8.js} +1 -1
  55. package/web/_app/immutable/chunks/{DEwfz-Il.js → DzAOHjhV.js} +1 -1
  56. package/web/_app/immutable/chunks/{DRKiKCov.js → Iqegk1SI.js} +1 -1
  57. package/web/_app/immutable/chunks/{Cl-Xmm9N.js → ONqdwA3r.js} +1 -1
  58. package/web/_app/immutable/chunks/{Dns-yz2Q.js → Oikibjm2.js} +1 -1
  59. package/web/_app/immutable/chunks/{CdD6waB-.js → T3u7Skc8.js} +1 -1
  60. package/web/_app/immutable/chunks/{Df3spPXn.js → cWWhqL1F.js} +1 -1
  61. package/web/_app/immutable/chunks/{CfTuc06U.js → fRXyV4Ec.js} +1 -1
  62. package/web/_app/immutable/chunks/{Dzu8v7nB.js → jAC4YCqW.js} +1 -1
  63. package/web/_app/immutable/chunks/{CB6ztdCQ.js → kFEqmLql.js} +1 -1
  64. package/web/_app/immutable/chunks/lSTs4h6V.js +1 -0
  65. package/web/_app/immutable/chunks/ufOJrCuz.js +517 -0
  66. package/web/_app/immutable/chunks/{BBhr3bLI.js → y0C1JQ1v.js} +1 -1
  67. package/web/_app/immutable/chunks/{CAuYgj5q.js → yvD4_bP8.js} +1 -1
  68. package/web/_app/immutable/entry/app.BRzQKhKX.js +2 -0
  69. package/web/_app/immutable/entry/start.-f1rSSM0.js +1 -0
  70. package/web/_app/immutable/nodes/0.i_AjenOL.js +11 -0
  71. package/web/_app/immutable/nodes/1.D6qHWJUF.js +1 -0
  72. package/web/_app/immutable/nodes/2.BPWtlg8V.js +1 -0
  73. package/web/_app/immutable/nodes/3.DaRPyiq0.js +1 -0
  74. package/web/_app/immutable/nodes/4.CkZ28L5K.js +3 -0
  75. package/web/_app/immutable/nodes/5.6ZCfORwJ.js +22 -0
  76. package/web/_app/immutable/nodes/6.B9EIxq5B.js +1 -0
  77. package/web/_app/immutable/nodes/7.DGJflKit.js +1 -0
  78. package/web/_app/version.json +1 -1
  79. package/web/index.html +17 -17
  80. package/web/_app/immutable/assets/0.DVQOzs4l.css +0 -1
  81. package/web/_app/immutable/chunks/BJOSVfg-.js +0 -1
  82. package/web/_app/immutable/chunks/CHjmZsHD.js +0 -1
  83. package/web/_app/immutable/chunks/CM4EA3Wo.js +0 -1
  84. package/web/_app/immutable/chunks/DH2bqH7t.js +0 -517
  85. package/web/_app/immutable/chunks/Ddw9FbDu.js +0 -1
  86. package/web/_app/immutable/chunks/IECP4ppk.js +0 -1
  87. package/web/_app/immutable/chunks/ZDkogIhD.js +0 -1
  88. package/web/_app/immutable/entry/app.CX19wIuG.js +0 -2
  89. package/web/_app/immutable/entry/start.DaiosA4i.js +0 -1
  90. package/web/_app/immutable/nodes/0.B6_Ycc14.js +0 -3
  91. package/web/_app/immutable/nodes/1.JA1sPybf.js +0 -1
  92. package/web/_app/immutable/nodes/2.DN2phYmE.js +0 -1
  93. package/web/_app/immutable/nodes/3.CbnLNp2F.js +0 -1
  94. package/web/_app/immutable/nodes/4.CIsG7Kdu.js +0 -3
  95. package/web/_app/immutable/nodes/5.D__u9ji8.js +0 -19
  96. package/web/_app/immutable/nodes/6.DBP0fpLt.js +0 -1
  97. package/web/_app/immutable/nodes/7.DuaH9aUr.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as e,a as t,b as n,d as r,i,o as a,s as o,u as s,x as c}from"./DS7XcdHs.js";import{a as l,o as u,r as d,t as f}from"./DciMwFJ1.js";import{a as p,d as m,i as h,l as g,s as _,u as v}from"./DK9wjWIk.js";import{t as y}from"./CdD6waB-.js";import{a as b,i as x,n as S,r as C,s as w,t as T}from"./_zY4mrA0.js";import{a as E,i as D,n as O,r as k,t as ee}from"./DrPF-vh8.js";import{t as A}from"./D6QVYUu9.js";import{i as te,n as ne,r as re,t as ie}from"./DQJRaTNz.js";import{i as ae,n as oe,r as se,t as ce}from"./Bx_Vz2qr.js";import{n as le,t as ue}from"./CggtIYAM.js";import{PeleError as j,c as M,d as de,g as N,h as P,i as F,n as I,s as fe,u as pe}from"./BNlziJ_1.js";function L(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}function me(e){return e.startsWith(`"`)&&e.endsWith(`"`)?e.substring(1,e.length-1):e}function R(e,t){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function z(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}function B(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`,t.startsWith(`x`)&&(r=`double_`+r,n=n.slice(1));break;case`>`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=R(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}var V=class{type=`flowchart`;direction;nodes=new Map;edges=[];subgraphs=[];classes=new Map;tooltips=new Map;defaultEdgeStyle;defaultInterpolate;title;accTitle;accDescr;subgraphLookup=new Map;members=new Set;edgeById=new Map;pairCount=new Map;subCount=0;options;constructor(e={}){this.options=e}addVertex(e,t,n,r,i,a,o,s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let t=s.includes(`
1
+ import{_ as e,a as t,b as n,d as r,i,o as a,s as o,u as s,x as c}from"./DlgOmQ_G.js";import{a as l,o as u,r as d,t as f}from"./DciMwFJ1.js";import{a as p,d as m,i as h,l as g,s as _,u as v}from"./BF3mdiSX.js";import{t as y}from"./T3u7Skc8.js";import{a as b,i as x,n as S,r as C,s as w,t as T}from"./BvhVny3O.js";import{a as E,i as D,n as O,r as k,t as ee}from"./-oRvYXNk.js";import{t as A}from"./D6QVYUu9.js";import{i as te,n as ne,r as re,t as ie}from"./CXc9Iibq.js";import{i as ae,n as oe,r as se,t as ce}from"./CMe14KUo.js";import{n as le,t as ue}from"./CggtIYAM.js";import{PeleError as j,c as M,d as de,g as N,h as P,i as F,n as I,s as fe,u as pe}from"./BArcFmbE.js";function L(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}function me(e){return e.startsWith(`"`)&&e.endsWith(`"`)?e.substring(1,e.length-1):e}function R(e,t){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function z(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}function B(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`,t.startsWith(`x`)&&(r=`double_`+r,n=n.slice(1));break;case`>`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=R(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}var V=class{type=`flowchart`;direction;nodes=new Map;edges=[];subgraphs=[];classes=new Map;tooltips=new Map;defaultEdgeStyle;defaultInterpolate;title;accTitle;accDescr;subgraphLookup=new Map;members=new Set;edgeById=new Map;pairCount=new Map;subCount=0;options;constructor(e={}){this.options=e}addVertex(e,t,n,r,i,a,o,s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let t=s.includes(`
2
2
  `)?s+`
3
3
  `:`{
4
4
  `+s+`
@@ -1,4 +1,4 @@
1
- import{s as e}from"./BNlziJ_1.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
1
+ import{s as e}from"./BArcFmbE.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,d as n,i as r,o as i,s as a,u as o,x as s}from"./DS7XcdHs.js";import{o as c,r as l}from"./DciMwFJ1.js";import{a as u,s as d}from"./DK9wjWIk.js";import{a as f}from"./_zY4mrA0.js";import{o as p,t as m}from"./DrPF-vh8.js";import{n as h}from"./CabmfniL.js";import{PeleError as g,g as _,h as v,s as y,u as b}from"./BNlziJ_1.js";var x=new Set([`label`,`type`,`descr`,`techn`,`sprite`,`tags`,`link`,`bgColor`,`fontColor`,`borderColor`,`shadowing`,`shape`,`legendText`,`legendSprite`]),S=new Set([`label`,`descr`,`techn`,`sprite`,`tags`,`link`,`textColor`,`lineColor`]);function C(e,t){let{key:n,value:r}=t;`from`in e&&(n===`offsetX`||n===`offsetY`)?e[n]=parseInt(r):(`from`in e?S:x).has(n)?e[n]=r:(e.extra??=new Map).set(n,r)}function w(e,t,n){n!==void 0&&(typeof n==`string`?e[t]=n:C(e,n))}function T(e,t,n){n===void 0?e[t]??=``:w(e,t,n)}function E(e,t){e.labelAttr=void 0,typeof t==`object`?(e.label=``,e.labelAttr=t,C(e,t)):e.label=t??``}var D=class{type=`c4`;c4Type;title;accTitle;accDescr;shapes=[];boundaries=[{alias:`global`,label:`global`,type:`global`,parent:void 0}];rels=[];shapeInRow=4;boundaryInRow=2;shapeIndex=new Map;boundaryIndex=new Map;relIndex=new Map;current=this.boundaries[0];stack=[];setC4Type(e){this.c4Type=e}setTitle(e){this.title=e}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
1
+ import{_ as e,a as t,d as n,i as r,o as i,s as a,u as o,x as s}from"./DlgOmQ_G.js";import{o as c,r as l}from"./DciMwFJ1.js";import{a as u,s as d}from"./BF3mdiSX.js";import{a as f}from"./BvhVny3O.js";import{o as p,t as m}from"./-oRvYXNk.js";import{n as h}from"./CMAnq3x6.js";import{PeleError as g,g as _,h as v,s as y,u as b}from"./BArcFmbE.js";var x=new Set([`label`,`type`,`descr`,`techn`,`sprite`,`tags`,`link`,`bgColor`,`fontColor`,`borderColor`,`shadowing`,`shape`,`legendText`,`legendSprite`]),S=new Set([`label`,`descr`,`techn`,`sprite`,`tags`,`link`,`textColor`,`lineColor`]);function C(e,t){let{key:n,value:r}=t;`from`in e&&(n===`offsetX`||n===`offsetY`)?e[n]=parseInt(r):(`from`in e?S:x).has(n)?e[n]=r:(e.extra??=new Map).set(n,r)}function w(e,t,n){n!==void 0&&(typeof n==`string`?e[t]=n:C(e,n))}function T(e,t,n){n===void 0?e[t]??=``:w(e,t,n)}function E(e,t){e.labelAttr=void 0,typeof t==`object`?(e.label=``,e.labelAttr=t,C(e,t)):e.label=t??``}var D=class{type=`c4`;c4Type;title;accTitle;accDescr;shapes=[];boundaries=[{alias:`global`,label:`global`,type:`global`,parent:void 0}];rels=[];shapeInRow=4;boundaryInRow=2;shapeIndex=new Map;boundaryIndex=new Map;relIndex=new Map;current=this.boundaries[0];stack=[];setC4Type(e){this.c4Type=e}setTitle(e){this.title=e}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
2
2
  `)}element(e,t,n,r){let i=typeof n==`string`?t.get(n):void 0;return i===void 0&&(i={alias:``,label:``,parent:void 0},e.push(i),typeof n==`string`?(i.alias=n,t.set(n,i)):(i.aliasAttr=n,C(i,n))),E(i,r),i}addPersonOrSystem(e,t){let n=this.element(this.shapes,this.shapeIndex,t[0],t[1]);T(n,`descr`,t[2]),this.finishShape(n,e,t,3)}addContainer(e,t){let n=this.element(this.shapes,this.shapeIndex,t[0],t[1]);T(n,`techn`,t[2]),T(n,`descr`,t[3]),this.finishShape(n,e,t,4)}addComponent(e,t){this.addContainer(e,t)}finishShape(e,t,n,r){w(e,`sprite`,n[r]),w(e,`tags`,n[r+1]),w(e,`link`,n[r+2]),e.kind=t,e.parent=this.current}boundary(e,t){let n=this.element(this.boundaries,this.boundaryIndex,e[0],e[1]);return e[2]===void 0?n.type=t:w(n,`type`,e[2]),n}open(e){e.parent=this.current,this.stack.push(this.current),this.current=e}addPersonOrSystemBoundary(e,t=`system`){let n=this.boundary(e,t);w(n,`tags`,e[3]),w(n,`link`,e[4]),this.open(n)}addContainerBoundary(e){this.addPersonOrSystemBoundary(e,`container`)}addDeploymentNode(e,t){let n=this.boundary(t,`node`);T(n,`descr`,t[3]),w(n,`sprite`,t[4]),w(n,`tags`,t[5]),w(n,`link`,t[6]),n.nodeType=e,this.open(n)}popBoundaryParseStack(){this.current=this.stack.pop()??this.boundaries[0]}addRel(e,t){let n=t[0],r=t[1];if(n===void 0||r===void 0||t[2]===void 0)return;let i=typeof n==`string`&&typeof r==`string`,a=i?this.relIndex.get(n)?.get(r):void 0;if(a===void 0){if(a={type:e,from:``,to:``,label:``},this.rels.push(a),i){let e=this.relIndex.get(n);e===void 0&&this.relIndex.set(n,e=new Map),e.set(r,a)}typeof n==`string`?a.from=n:a.fromAttr=n,typeof r==`string`?a.to=r:a.toAttr=r}a.type=e,E(a,t[2]),T(a,`techn`,t[3]),T(a,`descr`,t[4]),w(a,`sprite`,t[5]),w(a,`tags`,t[6]),w(a,`link`,t[7])}getC4Shape(e){return this.shapeIndex.get(e)??this.boundaryIndex.get(e)}updateElStyle(e,t){let n=typeof t[0]==`string`?this.getC4Shape(t[0]):void 0;n!==void 0&&(w(n,`bgColor`,t[1]),w(n,`fontColor`,t[2]),w(n,`borderColor`,t[3]),w(n,`shadowing`,t[4]),w(n,`shape`,t[5]),w(n,`sprite`,t[6]),w(n,`techn`,t[7]),w(n,`legendText`,t[8]),w(n,`legendSprite`,t[9]))}updateRelStyle(e,t){let n=t[0],r=t[1],i=typeof n==`string`&&typeof r==`string`?this.relIndex.get(n)?.get(r):void 0;if(i===void 0)return;w(i,`textColor`,t[2]),w(i,`lineColor`,t[3]);let a=t[4],o=t[5];typeof a==`string`?i.offsetX=parseInt(a):a!==void 0&&C(i,a),typeof o==`string`?i.offsetY=parseInt(o):o!==void 0&&C(i,o)}updateLayoutConfig(e,t){let n=e=>e===void 0?NaN:parseInt(typeof e==`string`?e:e.value),r=n(t[0]),i=n(t[1]);r>=1&&(this.shapeInRow=r),i>=1&&(this.boundaryInRow=i)}},O=`$end.INVALID.direction_tb.direction_bt.direction_rl.direction_lr.title.accDescription.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.NEWLINE.C4_CONTEXT.C4_CONTAINER.C4_COMPONENT.C4_DYNAMIC.C4_DEPLOYMENT.PERSON.PERSON_EXT.SYSTEM.SYSTEM_DB.SYSTEM_QUEUE.SYSTEM_EXT.SYSTEM_EXT_DB.SYSTEM_EXT_QUEUE.CONTAINER.CONTAINER_DB.CONTAINER_QUEUE.CONTAINER_EXT.CONTAINER_EXT_DB.CONTAINER_EXT_QUEUE.COMPONENT.COMPONENT_DB.COMPONENT_QUEUE.COMPONENT_EXT.COMPONENT_EXT_DB.COMPONENT_EXT_QUEUE.ENTERPRISE_BOUNDARY.SYSTEM_BOUNDARY.BOUNDARY.CONTAINER_BOUNDARY.NODE.NODE_L.NODE_R.REL.BIREL.REL_U.REL_D.REL_L.REL_R.REL_B.REL_INDEX.UPDATE_EL_STYLE.UPDATE_REL_STYLE.UPDATE_LAYOUT_CONFIG.EOF_IN_STRUCT.ATTRIBUTE_EMPTY.STR.STR_KEY.STR_VALUE.LBRACE.RBRACE.EOF`.split(`.`),k=new Map([[`C4Context`,14],[`C4Container`,15],[`C4Component`,16],[`C4Dynamic`,17],[`C4Deployment`,18],[`Person`,19],[`Person_Ext`,20],[`System`,21],[`SystemDb`,22],[`SystemQueue`,23],[`System_Ext`,24],[`SystemDb_Ext`,25],[`SystemQueue_Ext`,26],[`Container`,27],[`ContainerDb`,28],[`ContainerQueue`,29],[`Container_Ext`,30],[`ContainerDb_Ext`,31],[`ContainerQueue_Ext`,32],[`Component`,33],[`ComponentDb`,34],[`ComponentQueue`,35],[`Component_Ext`,36],[`ComponentDb_Ext`,37],[`ComponentQueue_Ext`,38],[`Enterprise_Boundary`,39],[`System_Boundary`,40],[`Boundary`,41],[`Container_Boundary`,42],[`Deployment_Node`,43],[`Node`,43],[`Node_L`,44],[`Node_R`,45],[`Rel`,46],[`BiRel`,47],[`Rel_Up`,48],[`Rel_U`,48],[`Rel_Down`,49],[`Rel_D`,49],[`Rel_Left`,50],[`Rel_L`,50],[`Rel_Right`,51],[`Rel_R`,51],[`Rel_Back`,52],[`RelIndex`,53],[`UpdateElementStyle`,54],[`UpdateRelStyle`,55],[`UpdateLayoutConfig`,56]]),A=[/.*direction\s+TB[^\n]*/y,/.*direction\s+BT[^\n]*/y,/.*direction\s+RL[^\n]*/y,/.*direction\s+LR[^\n]*/y],j=/[\n\r\u2028\u2029]/g,M=/title[^\S\r\n]*(?=[\r\n]|$)\s*/y;function N(e){let t=e.length,n=[],r=[],i=[],a=0,o=9,s=0,c=!1,l=-2,u=-1,d=0,f=(e,t,a)=>{n.push(e),r.push(t),i.push(a),s=a},p=n=>{for(;n<t&&v(e.charCodeAt(n));)n++;return n},m=(n,r)=>{let i=e.indexOf(n,r);return i===-1?t:i},h=(n,r)=>{let i=s+n.length;if(!e.startsWith(n,s)||!v(e.charCodeAt(i)))return!1;let a=++i;for(;i<t;){let t=e.charCodeAt(i);if(t===35||t===10||t===59)break;i++}return i!==a&&(f(r,s,i),!0)};for(;;){if(c){f(0,t,t);break}s>=t&&(c=!0);let n=e.charCodeAt(s);if(a===0){if(s>=t){f(64,t,t);continue}if(l!==-1&&s>=d&&(l<s&&(l=e.indexOf(`direction`,s)),l!==-1&&(u<s&&(j.lastIndex=s,u=j.test(e)?j.lastIndex-1:t),l<u))){let t=!1;for(let n=0;n<4&&!t;n++)A[n].lastIndex=s,A[n].test(e)&&(f(2+n,s,A[n].lastIndex),t=!0);if(t)continue;d=u}if(n===116){if(M.lastIndex=s,M.test(e)){s=M.lastIndex;continue}if(h(`title`,6))continue}if(n===97){if(h(`accDescription`,7))continue;let t=e.startsWith(`accTitle`,s);if(t||e.startsWith(`accDescr`,s)){let n=p(s+8),r=e.charCodeAt(n);if(r===58){f(t?8:10,s,p(n+1)),o=t?9:11,a=7;continue}if(r===123&&!t){s=p(n+1),a=8;continue}}}if(n===37&&e.charCodeAt(s+1)===37){let n=m(`
3
3
  `,s+2);for(;n<t&&(e.charCodeAt(n)===10||e.charCodeAt(n)===13);)n++;s=n;continue}if(v(n)){let n=s,r=-1;for(;n<t;){let t=e.charCodeAt(n);if(!v(t))break;t===10&&(r=n),n++}r===-1?s=n:f(13,s,r+1);continue}if(n===123){f(62,s,s+1);continue}if(n===125){f(63,s,s+1);continue}if(_(n)){let n=s+1;for(;n<t&&_(e.charCodeAt(n));)n++;let r=n-s<=19?k.get(e.slice(s,n)):void 0;if(r!==void 0){r>18&&(a=1),f(r,s,n);continue}}f(1,s,s);break}if(a===1){if(s>=t)f(57,t,t);else if(n===40){let t=s+1;for(;e.charCodeAt(t)===32;)t++;e.charCodeAt(t)===44?f(58,s,t+1):s++,a=2}else if(n===41)s++,a=0;else{f(1,s,s);break}}else if(a===2){if(s>=t)continue;if(n===41)s++,a=0;else if(n===44)e.charCodeAt(s+1)===44?f(58,s,s+2):s++;else{let t=s;for(;e.charCodeAt(t)===32;)t++;let n=e.charCodeAt(t);n===34?e.charCodeAt(t+1)===34?f(58,s,t+2):(s=t+1,a=3):n===36?(s=t+1,a=4):f(59,s,m(`,`,s))}}else if(a===3)n===34?(s++,a=2):f(59,s,m(`"`,s));else if(a===4)f(60,s,m(`=`,s)),a=5;else if(a===5){if(s>=t)continue;let r=s+1;if(n===61)for(;e.charCodeAt(r)===32;)r++;if(n!==61||e.charCodeAt(r)!==34){f(1,s,s);break}s=r+1,a=6}else if(a===6){if(s>=t)continue;n===34?(s++,a=2):f(61,s,m(`"`,s))}else a===7?(f(o,s,m(`
4
4
  `,s)),a=0):n===125?(s++,a=0):f(12,s,m(`}`,s))}return{types:n,starts:r,ends:i}}var P=[`person`,`external_person`,`system`,`system_db`,`system_queue`,`external_system`,`external_system_db`,`external_system_queue`,`container`,`container_db`,`container_queue`,`external_container`,`external_container_db`,`external_container_queue`,`component`,`component_db`,`component_queue`,`external_component`,`external_component_db`,`external_component_queue`],F=[`rel`,`birel`,`rel_u`,`rel_d`,`rel_l`,`rel_r`,`rel_b`,`rel`],I=[`node`,`nodeL`,`nodeR`],ee=`'direction_tb', 'direction_bt', 'direction_rl', 'direction_lr', 'C4_CONTEXT', 'C4_CONTAINER', 'C4_COMPONENT', 'C4_DYNAMIC', 'C4_DEPLOYMENT'`,te=`'STR', 'STR_KEY', 'ATTRIBUTE', 'ATTRIBUTE_EMPTY'`;function L(e){return e===6||e===7||e===8||e===10||e===12}function ne(e){return e>=19&&e<=56}function R(e,t){let{types:n,starts:r,ends:i}=N(e),a=0,o=t=>e.slice(r[t],i[t]),s=t=>{let i=n[a];throw i===1?y(`c4`,e,r[a],``,!0):y(`c4`,e,r[a],`Expecting ${t}, got '${O[i]}'`)},c=e=>{n[a]!==e&&s(`'${O[e]}'`),a++},l=()=>{let e=[];for(;;){let t=n[a];if(t===59)e.push(o(a++).trim());else if(t===58)e.push(``),a++;else if(t===60)a++,n[a]!==61&&s(`'STR_VALUE'`),e.push({key:o(a-1).trim(),value:o(a).trim()}),a++;else break}return e.length===0&&s(te),e},u=e=>{e===6?t.setTitle(o(a++).substring(6)):e===7?t.setAccDescription(o(a++).substring(15)):e===12?t.setAccDescription(o(a++).trim()):(a++,e===8?(n[a]!==9&&s(`'acc_title_value'`),t.setTitle(o(a++).trim())):(n[a]!==11&&s(`'acc_descr_value'`),t.setAccDescription(o(a++).trim())))},d=e=>{a++;let r=l();if(e<=26)t.addPersonOrSystem(P[e-19],r);else if(e<=32)t.addContainer(P[e-19],r);else if(e<=38)t.addComponent(P[e-19],r);else{if(e<=45)return e===39?r.splice(2,0,`ENTERPRISE`):e===40?r.splice(2,0,`SYSTEM`):e===42&&r.splice(2,0,`CONTAINER`),e>=43?t.addDeploymentNode(I[e-43],r):e===42?t.addContainerBoundary(r):t.addPersonOrSystemBoundary(r),n[a]===62?(a++,c(13)):n[a]===13?(a++,c(62),n[a]===13&&a++):s(`'NEWLINE', 'LBRACE'`),!0;e<=53?(e===53&&r.splice(0,1),t.addRel(F[e-46],r)):e===54?t.updateElStyle(`update_el_style`,r):e===55?t.updateRelStyle(`update_rel_style`,r):t.updateLayoutConfig(`update_layout_config`,r)}return!1},f=n[a];(f<14||f>18)&&s(ee),a++,c(13);let p=0,m=0;for(;;){let e=n[a];if(m===3||m===4){if(e===13){a++,m=2;continue}if(m===3&&ne(e)){m=1;continue}}else if(ne(e)){d(e)?(p++,m=1):m=4;continue}else if(L(e)&&m!==1){u(e),m=3;continue}else m!==2&&s(`'title', 'accDescription', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'PERSON', 'REL'`);if(p>0)e!==63&&s(`'NEWLINE', 'RBRACE'`),a++,t.popBoundaryParseStack(),p--,m=4;else{e!==64&&s(`'NEWLINE', 'EOF'`),a++,c(0),t.setC4Type(o(0));return}}}var z=28,B=20,V=7,H=8,U=30,W=88,G=160,re=8,ie=26,ae=e=>Math.min(12,Math.max(6,e/14)),oe=e=>Math.min(12,e/4);function K(e,t,n,r,i,a,o,s){let c=0,l=1;if(o===0){if(i<e||i>n)return 1/0}else{let t=(e-i)/o,r=(n-i)/o;c=Math.max(c,Math.min(t,r)),l=Math.min(l,Math.max(t,r))}if(s===0){if(a<t||a>r)return 1/0}else{let e=(t-a)/s,n=(r-a)/s;c=Math.max(c,Math.min(e,n)),l=Math.min(l,Math.max(e,n))}return c<=l?c:1/0}function q(e,t,n,r,i,a,o,s){let c=o/n,l=s/r,u=(i-e)/n,d=(a-t)/r,f=c*c+l*l,p=2*(c*u+l*d),m=u*u+d*d-1,h=p*p-4*f*m;if(f===0||h<0)return 1/0;let g=(-p-Math.sqrt(h))/(2*f);return g>=0&&g<=1?g:m<=0?0:1/0}function J(e,t,n,r,i){let{x:a,y:o,w:s,h:c}=e,l=r-t,u=i-n;if(e.form===`person`)return Math.min(K(a,o+ie,a+s,o+c,t,n,l,u),q(a+s/2,o+14,13,13,t,n,l,u));if(e.form===`cyl`){let e=ae(s);return Math.min(K(a,o+e,a+s,o+c-e,t,n,l,u),q(a+s/2,o+e,s/2,e,t,n,l,u),q(a+s/2,o+c-e,s/2,e,t,n,l,u))}if(e.form===`h-cyl`){let e=oe(c);return Math.min(K(a+e,o,a+s-e,o+c,t,n,l,u),q(a+e,o+c/2,e,c/2,t,n,l,u),q(a+s-e,o+c/2,e,c/2,t,n,l,u))}return K(a,o,a+s,o+c,t,n,l,u)}function se(e,t,n,r,i){for(let a=2;a<e.length;a+=2){let o=e[a-2],s=e[a-1];if(K(t,n,r,i,o,s,e[a]-o,e[a+1]-s)<=1)return!0}return!1}function Y(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.w>=t.x+t.w&&e.y+e.h>=t.y+t.h}function ce(e,t,n){let r=e.x+e.w/2,i=e.y+e.h/2,a=t.x+t.w/2,o=t.y+t.h/2,s=Y(e,t);if(s||Y(t,e)){let n=s?e:t,r=s?t:e,i=r.x+r.w/2,a=r.y+r.h/2,o=r.x-n.x,c=n.x+n.w-r.x-r.w,l=r.y-n.y,u=n.y+n.h-r.y-r.h,d=Math.min(o,c,l,u),f=d===o?n.x:d===c?n.x+n.w:i,p=d===o||d===c?a:d===u?n.y+n.h:n.y,m=Math.min(J(r,f,p,i,a),1),h=f+(i-f)*m,g=p+(a-p)*m;return s?[f,p,h,g]:[h,g,f,p]}let c=r,l=i,u=a,d=o,f=Math.max(e.x,t.x),p=Math.min(e.x+e.w,t.x+t.w),m=Math.max(e.y,t.y),h=Math.min(e.y+e.h,t.y+t.h);f<p?c=u=(f+p)/2:m<h&&(l=d=(m+h)/2);let g=Math.hypot(u-c,d-l)||1,_=-(d-l)/g*n,v=(u-c)/g*n,y=J(e,u+_,d+v,c+_,l+v),b=J(t,c+_,l+v,u+_,d+v);return y<=1&&b<=1?(c+=_,l+=v,u+=_,d+=v):(c=r,l=i,u=a,d=o,y=Math.min(J(e,u,d,c,l),1),b=Math.min(J(t,c,l,u,d),1)),[u+(c-u)*y,d+(l-d)*y,c+(u-c)*b,l+(d-l)*b]}var le=6,ue=3,de=12,fe=class{upright=[];level=[];frames=[[],[]];taken=new Map;squeezed=0;free(e,t,n,r){let i=Math.min(n,r),a=Math.max(n,r),o=(e,n)=>{for(let r=0;r<e.length;r+=3)if(Math.abs(e[r]-t)<n&&e[r+1]<a&&e[r+2]>i)return!0;return!1};return!o(e?this.upright:this.level,le)&&!o(this.frames[+!e],ue)}crossings(e){let t=0;for(let n=2;n<e.length;n+=2){let r=e[n]===e[n-2],i=r?e[n]:e[n+1],a=Math.min(r?e[n-1]:e[n-2],r?e[n+1]:e[n]),o=Math.max(r?e[n-1]:e[n-2],r?e[n+1]:e[n]),s=r?this.level:this.upright;for(let e=0;e<s.length;e+=3)s[e]>a&&s[e]<o&&s[e+1]<i&&s[e+2]>i&&t++}return t}frame(e){this.frames[0].push(e.x,e.y,e.y+e.h,e.x+e.w,e.y,e.y+e.h),this.frames[1].push(e.y,e.x,e.x+e.w,e.y+e.h,e.x,e.x+e.w)}take(e){for(let t=2;t<e.length;t+=2)e[t]===e[t-2]?this.upright.push(e[t],Math.min(e[t-1],e[t+1]),Math.max(e[t-1],e[t+1])):e[t+1]===e[t-1]&&this.level.push(e[t+1],Math.min(e[t-2],e[t]),Math.max(e[t-2],e[t]))}ports(e,t,n,r,i){let a=this.taken.get(e)??[],o=[];for(let e=0;e<9&&o.length<4;e++){let s=n+(e&1?1:-1)*Math.ceil(e/2)*de;if(s<r||s>i)continue;let c=!0;for(let e=0;e<a.length;e+=2)a[e]===t&&Math.abs(a[e+1]-s)<de&&(c=!1);c&&o.push(s)}return o.length?o:[n]}claim(e,t,n){let r=this.taken.get(e);r?r.push(t,n):this.taken.set(e,[t,n])}};function pe(e,t,n){let r=e.length,i=Math.sign(e[2]-e[0]),a=Math.sign(e[3]-e[1]),o=`M${s(e[0]+i*t)},${s(e[1]+a*t)}`;for(let t=2;t<r-2;t+=2){let n=e[t],r=e[t+1],i=Math.sign(n-e[t-2]),a=Math.sign(r-e[t-1]),c=Math.sign(e[t+2]-n),l=Math.sign(e[t+3]-r),u=Math.min(H,Math.abs(n-e[t-2]+r-e[t-1])/2,Math.abs(e[t+2]-n+e[t+3]-r)/2);o+=`${i?`H`+s(n-i*u):`V`+s(r-a*u)}Q${s(n)},${s(r)} ${s(n+c*u)},${s(r+l*u)}`}let c=Math.sign(e[r-2]-e[r-4]),l=Math.sign(e[r-1]-e[r-3]);return o+(c?`H`+s(e[r-2]-c*n):`V`+s(e[r-1]-l*n))}function me(e,t,n,r){for(let i of t)if(i!==n&&i!==r&&se(e,i.x,i.y,i.x+i.w,i.y+i.h))return!1;return!0}function he(e,t,n,r,i){let a=e.length;return{d:pe(e,n,r),sx:e[0],sy:e[1],sdx:-Math.sign(e[2]-e[0]),sdy:-Math.sign(e[3]-e[1]),ex:e[a-2],ey:e[a-1],edx:Math.sign(e[a-2]-e[a-4]),edy:Math.sign(e[a-1]-e[a-3]),x0:e[t],y0:e[t+1],x1:e[t+2],y1:e[t+3],nx:0,ny:0,lean:0,room:G,...i,points:e}}function ge(e,t){let n=[],r=(e+t)/2,i=Math.max(V,(t-e)/4);for(let a=0;a<9;a++){let o=r+(a&1?1:-1)*Math.ceil(a/2)*i;o>=e+le&&o<=t-le&&n.push(o)}return n}function _e(e,t,n,r,i,a){let o=e.x+e.w/2,s=e.y+e.h/2,c=t.x+t.w/2,l=t.y+t.h/2,u,d=(i,a,o)=>{if(!me(i,n,e,t))return;for(let e=2;e<i.length;e+=2){let t=i[e]===i[e-2];if(!r.free(t,t?i[e]:i[e+1],t?i[e-1]:i[e-2],t?i[e+1]:i[e]))return}let s=r.crossings(i)*1e6;for(let e=2;e<i.length;e+=2)s+=Math.abs(i[e]-i[e-2])+Math.abs(i[e+1]-i[e-1]);(!u||s<u.cost)&&(u={points:i,cost:s,upright:a,sides:o})};if(e.x+e.w<=t.x||t.x+t.w<=e.x){let n=c>o,i=Math.sign(l-s),a=n?[1,0]:[0,1],f=ge(n?e.x+e.w:t.x+t.w,n?t.x:e.x);e:for(let n of r.ports(e,a[0],s+i*e.h/4,e.y+8,e.y+e.h-8))for(let s of r.ports(t,a[1],l-i*t.h/4,t.y+8,t.y+t.h-8))for(let r of f){let i=r+(o-r)*Math.min(J(e,r,n,o,n),1),l=r+(c-r)*Math.min(J(t,r,s,c,s),1),f=u;if(d([i,n,r,n,r,s,l,s],!0,a),u!==f)break e}}if(e.y+e.h<=t.y||t.y+t.h<=e.y){let n=l>s,i=Math.sign(c-o),a=n?[3,2]:[2,3],f=ge(n?e.y+e.h:t.y+t.h,n?t.y:e.y);e:for(let n of r.ports(e,a[0],o+i*e.w/4,e.x+8,e.x+e.w-8))for(let o of r.ports(t,a[1],c-i*t.w/4,t.x+8,t.x+t.w-8))for(let r of f){let i=r+(s-r)*Math.min(J(e,n,r,n,s),1),c=r+(l-r)*Math.min(J(t,o,r,o,l),1),f=u;if(d([n,i,n,r,o,r,o,c],!1,a),u!==f)break e}}if(!u)return;let{points:f,upright:p,sides:m}=u;return r.take(f),r.claim(e,m[0],p?f[1]:f[0]),r.claim(t,m[1],p?f[7]:f[6]),he(f,2,i,a,{room:p?W:G})}function ve(e,t,n,r,i,a,o){if(e===t){let t=Math.min(e.h/2-4,10),n=Math.hypot(z,t),r=e.x+e.w,i=e.y+e.h/2,c=z/n,l=t/n;return{d:`M${s(r+c*a)},${s(i-t-l*a)}C${s(r+z)},${s(i-t*2)} ${s(r+z)},${s(i+t*2)} ${s(r+c*o)},${s(i+t+l*o)}`,sx:r,sy:i-t,sdx:-c,sdy:l,ex:r,ey:i+t,edx:-c,edy:-l,x0:r+z+4,y0:i,x1:r+z+4,y1:i,nx:1,ny:0,lean:0,room:64,points:[]}}let[c,l,u,d]=ce(e,t,n),f=c===u,p=!1;if(r&&!Y(e,t)&&!Y(t,e))for(let n of r)n!==e&&n!==t&&K(n.x,n.y,n.x+n.w,n.y+n.h,c,l,u-c,d-l)<=1&&(p=!0);if(r&&p&&!f&&l!==d){let n=_e(e,t,r,i,a,o);if(n)return n;i.squeezed++}if(r&&p&&(f||l===d)){let n=n=>{let i=n?-1/0:1/0,a=e=>{let t=f?e.x:e.y;i=n?Math.max(i,t+(f?e.w:e.h)):Math.min(i,t)};a(e),a(t);for(let n of r)n!==e&&n!==t&&K(n.x,n.y,n.x+n.w,n.y+n.h,c,l,u-c,d-l)<=1&&a(n);return i},s=f?Math.min(e.y,t.y):Math.min(e.x,t.x),p=f?Math.max(e.y+e.h,t.y+t.h):Math.max(e.x+e.w,t.x+t.w),m=(n,i)=>{for(let a of r){if(a===e||a===t)continue;let r=f?a.y<p&&a.y+a.h>s:a.x<p&&a.x+a.w>s,o=f?a.x:a.y,c=o+(f?a.w:a.h);if(r&&(n?c>i:o<i))return!1}return!0},h=e.x+e.w/2,g=e.y+e.h/2,_=t.x+t.w/2,v=t.y+t.h/2,y=Math.sign(f?v-g:_-h),b=a=>{let o=n(a),s=a?1:-1,c=f?+!!a:a?3:2,l=f?i.ports(e,c,g+y*e.h/4,e.y+8,e.y+e.h-8)[0]:i.ports(e,c,h+y*e.w/4,e.x+8,e.x+e.w-8)[0],u=f?i.ports(t,c,v-y*t.h/4,t.y+8,t.y+t.h-8)[0]:i.ports(t,c,_-y*t.w/4,t.x+8,t.x+t.w-8)[0],d=n=>{if(f){let r=n+(h-n)*Math.min(J(e,n,l,h,l),1),i=n+(_-n)*Math.min(J(t,n,u,_,u),1);return[r,l,n,l,n,u,i,u]}let r=n+(g-n)*Math.min(J(e,l,n,l,g),1),i=n+(v-n)*Math.min(J(t,u,n,u,v),1);return[l,r,l,n,u,n,u,i]},p=d(o+s*B);for(let n=0;n<=4;n++){let a=o+s*(B+n*V),m=d(a);if(me(m,r,e,t)&&(p=m,i.free(f,a,l,u)))return{points:p,side:c,p0:l,p1:u,step:n}}return{points:p,side:c,p0:l,p1:u,step:5}},x=f?d>l:u<c,S=m(x,n(x)),C=m(!x,n(!x)),w=b(x),T=S===C?b(!x):void 0,E=e=>i.crossings(e.points)*8+e.step,D=C&&!S||T&&E(T)<E(w)?!x:x,{points:O,side:k,p0:A,p1:j,step:M}=D===x?w:T??b(!x),N=D?1:-1;return M>4&&i.squeezed++,i.take(O),i.claim(e,k,A),i.claim(t,k,j),he(O,2,a,o,f?{nx:N,lean:U,room:W}:{room:G})}let m=Math.hypot(u-c,d-l)||1,h=(u-c)/m,g=(d-l)/m;return(f||l===d)&&i.take([c,l,u,d]),{d:`M${s(c+h*a)},${s(l+g*a)}L${s(u-h*o)},${s(d-g*o)}`,sx:c,sy:l,sdx:-h,sdy:-g,ex:u,ey:d,edx:h,edy:g,x0:c,y0:l,x1:u,y1:d,nx:n?-g:0,ny:n?h:0,lean:0,room:Math.abs(h)>Math.abs(g)?W:G,points:[c,l,u,d]}}var ye=216,be=64,xe=14,Se=12,Ce=W+re+24,we=88,Te=B+8,X=48,Z=16,Ee=10,De=new Map([[`person`,`person`],[`box`,`rect`],[`rounded`,`rect`],[`component`,`rect`],[`cylinder`,`cyl`],[`database`,`cyl`],[`db`,`cyl`],[`queue`,`h-cyl`],[`pipe`,`h-cyl`]]);function Oe(e){let t=De.get((e.shape??``).toLowerCase())??De.get((e.sprite??``).toLowerCase());if(t)return t;if(e.tags)for(let t of e.tags.split(`,`)){let e=De.get(t.trim().toLowerCase());if(e)return e}let n=e.kind;return n.endsWith(`person`)?`person`:n.endsWith(`_db`)?`cyl`:n.endsWith(`_queue`)?`h-cyl`:`rect`}function ke(e,t,n,r,i=ye){let a=Oe(e),s=a===`h-cyl`?36:0,c=a===`person`?ie:a===`cyl`?24:0,l=i-2*xe-s,u=[o(`«`+e.kind.replace(/_/g,` `)+`»`,!1,t,r-1,l),o(e.label,!1,t,n,l,1),o(e.techn?`[${e.techn}]`:void 0,!1,t,r,l),o(e.descr,!1,t,r,l)],d=0,f=u[3].height>0?4:0;for(let e of u)d=Math.max(d,e.width),f+=e.height;return{shape:e,form:a,labels:u,textH:f,x:0,y:0,w:Math.max(i,d+2*xe+s),h:Math.max(be,f+2*Se+c)}}function Ae(e,t,n,r,i){let a=0,o=0;for(let s=0;s<e.length;s+=t){let c=Math.min(e.length,s+t),l=0,u=0;for(let t=s;t<c;t++)u=Math.max(u,e[t].h);for(let t=s;t<c;t++){let r=e[t];r.x=l,r.y=o,i&&(r.h=u),l+=r.w+n}a=Math.max(a,l-n),o+=u+r}return[a,e.length>0?o-r:0]}function je(e,t,n,r,i,a){let s=i===void 0?Te:12,c=new Map;for(let a of e.boundaries){let e=i===void 0?4e3:Math.max(80,i-2*Z-2*Te*2),l=a.parent?[o(a.label,!1,t,n,e,1),o(a.type?`[${a.type}]`:void 0,!1,t,r,e),o(a.descr,!1,t,r,e)]:[],u=0,d=0;for(let e of l)u+=e.height,d=Math.max(d,e.width);c.set(a,{boundary:a,kids:[],nodes:[],labels:l,head:u>0?u+Ee+6+B:s,headW:d,headX:Z,x:0,y:0,w:0,h:0,form:`rect`})}let l=c.get(e.boundaries[0]);for(let e of c.values()){let t=e.boundary.parent;t&&c.get(t)?.kids.push(e)}let u=[l],d=new Map([[l.boundary,0]]);for(let e=0;e<u.length;e++)for(let t of u[e].kids)d.set(t.boundary,d.get(u[e].boundary)+1),u.push(t);for(let a of e.shapes)if(a.parent){let e=d.get(a.parent)??0,o=i===void 0?ye:Math.max(100,Math.min(ye,i-2*e*s-32));c.get(a.parent)?.nodes.push(ke(a,t,n,r,o))}let f=Math.max(1,e.shapeInRow),p=Math.max(1,e.boundaryInRow),m=new Map;for(let e=u.length-1;e>=0;e--){let t=u[e],n=i===void 0?Ce:a,r=(e,t,n)=>{if(i===void 0)return t;let r=1;for(let t of e)r=Math.max(r,t.w);return Math.max(1,Math.min(t,Math.floor((i+n-2*s)/(r+n))))},[o,c]=Ae(t.nodes,r(t.nodes,f,n),n,we,!0),[d,h]=Ae(t.kids,r(t.kids,p,X),X,X,!1),g=c>0&&h>0?X:0,_=t===l?0:s;m.set(t,c+g),t.w=Math.max(o,d,t.headW+2*Z-2*_)+2*_,t.h=(_&&t.head)+c+g+h+_}let h=new Map;for(let e of u){let t=e.x+(e===l?0:s),n=e.y+(e===l?0:e.head);for(let r of e.nodes)r.x+=t,r.y+=n,h.set(r.shape,r);for(let r of e.kids)r.x+=t,r.y+=n+m.get(e);e!==l&&h.set(e.boundary,e)}return{order:u,boxes:h}}var Me=7,Q=36,Ne=24,Pe=2e3,$=8,Fe=[.5,.4,.6,.3,.7,.2,.8],Ie=2e6;function Le(e,t,n){let r=[];return e&&r.push(`fill:`+e),t&&r.push(`stroke:`+t),n&&r.push(`color:`+n),a(r)}function Re(e,t,n,r,i){return t?m(e,p(t.includes(`¶ß`)?t.replace(/\ufb02\u00b0\u00b0?/g,`#`).replace(/\u00b6\u00df/g,`;`):t),n,r,i):e}function ze(e,t,n){return c(n,r=>{if(!r)return Be(e,t,n,!1)[0];let[i,a]=Be(e,t,n,!0,Q);for(let r=Q+Ne;a>0&&r<=Q+3*Ne;r+=Ne){let[o,s]=Be(e,t,n,!0,r);s<a&&([i,a]=[o,s])}return i})}function Be(a,c,p,m,_=Q){let v=p.fontSize??16,y=Math.round(v*.8125),x=p.measurer??b(p.fontFamily,p.fontFamilyMono),S=p.padding??8,C=[],{order:w,boxes:T}=je(a,x,v,y,m?Math.max(80,(p.maxWidth??320)-2*S):void 0,_),E=w[0],D=0,O=0,k=E.w,A=E.h,j=(e,t,n,r)=>{D=Math.min(D,e),O=Math.min(O,t),k=Math.max(k,n),A=Math.max(A,r)},M=[],N=new Map;for(let e of a.rels){let t=e.fromAttr?void 0:a.getC4Shape(e.from),n=e.toAttr?void 0:a.getC4Shape(e.to),r=t&&T.get(t),i=n&&T.get(n);if(!r||!i)throw new g(`C4 rel "${e.from}" -> "${e.to}" references an unknown shape or boundary`,`semantic`,{type:`c4`});M.push(r,i);let o=N.get(r);o||N.set(r,o=new Set),o.add(i)}let P=[],F=[];for(let e of w)for(let t of e.nodes)P.push(t),F.push(t.x+$,t.y+$,t.x+t.w-$,t.y+t.h-$);let I=a.rels.length*(P.length+w.length+3*a.rels.length)<=Ie,ee=(e,t,n,r)=>{let i=0;for(let a=0;a<F.length;a+=4){let o=Math.min(n,F[a+2])-Math.max(e,F[a]);if(o<=0)continue;let s=Math.min(r,F[a+3])-Math.max(t,F[a+1]);s>0&&(i+=o*s)}return i},te=e=>e?Math.max(-Pe,Math.min(Pe,e)):0,L=``,ne=u(`arrow_point`),R=new fe;for(let e of w)e!==E&&R.frame(e);let z=a.rels.map((e,n)=>{let i=M[n*2],a=M[n*2+1],o=Le(void 0,e.lineColor,void 0),s=o.stroke?t(o.stroke):`var(--_l)`,c=e.type===`birel`||e.type===`rel_b`,l=e.type!==`rel_b`,u=ve(i,a,i!==a&&N.get(a)?.has(i)===!0?Me:0,I?P:void 0,R,c?ne:0,l?ne:0);return j(Math.min(u.x0,u.x1),Math.min(u.y0,u.y1),Math.max(u.x0,u.x1),Math.max(u.y0,u.y1)),c&&I&&F.push(u.sx-8,u.sy-8,u.sx+8,u.sy+8),l&&I&&F.push(u.ex-8,u.ey-8,u.ex+8,u.ey+8),L+=`<g class="pele-edge" data-id="${r(e.from+`-`+e.to)}"${o.line}><path d="${u.d}"/>`+(c?d(`arrow_point`,u.sx,u.sy,u.sdx,u.sdy,s):``)+(l?d(`arrow_point`,u.ex,u.ey,u.edx,u.edy,s):``)+`</g>`,u});for(let e of w){if(!I||e.headW===0)continue;let t=e.y+Ee,n=e.y+e.head-B,r=1/0;for(let i of[Z,(e.w-e.headW)/2,e.w-Z-e.headW]){let a=0;for(let r of z)se(r.points,e.x+i-4,t,e.x+i+e.headW+4,n)&&a++;if(a<r&&(r=a,e.headX=i),a===0)break}F.push(e.x+e.headX-4,t,e.x+e.headX+e.headW+4,n)}let V=``;a.rels.forEach((e,t)=>{let n=z[t],c=e.from+`-`+e.to,l=Le(void 0,void 0,e.textColor),u=(a.c4Type===`C4Dynamic`?t+1+`: `:``)+e.label,d=o(u,!1,x,y,n.room),f=o(e.techn?`[${e.techn}]`:void 0,!1,x,y,n.room,2),h=Math.max(d.width,f.width)+re,g=d.height+f.height;if(g===0)return;let _=Math.abs(n.nx)*(h/2)+Math.abs(n.ny)*(g/2)+2,v=n.lean?Math.max(0,Math.min(n.lean,_-14)):_,b=n.nx*v+(m?0:te(e.offsetX)),S=n.ny*v+(m?0:te(e.offsetY)),w=.5;if(I){let e=1/0,t=b!==n.nx*v||S!==n.ny*v;for(let r=0;r<(t?2:1)&&e>0;r++){let t=r?n.nx*v:b,i=r?n.ny*v:S;for(let r of Fe){let a=n.x0+(n.x1-n.x0)*r+t,o=n.y0+(n.y1-n.y0)*r+i,s=ee(a-h/2,o-g/2,a+h/2,o+g/2);if(s<e&&(e=s,w=r,b=t,S=i),s===0)break}}}let T=n.x0+(n.x1-n.x0)*w+b,E=n.y0+(n.y1-n.y0)*w+S-g/2;I&&F.push(T-h/2,E,T+h/2,E+g),j(T-h/2,E,T+h/2,E+g),V+=`<g class="pele-edge-label" data-id="${r(c)}">`+(e.descr?`<title>${r(e.descr)}</title>`:``)+`<rect x="${s(T-h/2)}" y="${s(E)}" width="${s(h)}" height="${s(g)}" rx="3" fill="var(--_bg)"/>`+Re(i(d,T,E+d.height/2,l.text)+i(f,T,E+d.height+f.height/2,` class="pele-c4-techn" fill="var(--_m)"${l.text}`),e.link,c,C,p)+`</g>`});let H=``,U=``;for(let e of w){if(e!==E){let t=e.boundary,i=Le(t.bgColor,t.borderColor,t.fontColor),a=e.x+e.headX,o=e.y+Ee,c=h(e.labels[0],a,o,` class="pele-cluster-label" font-weight="var(--_hw)"${i.text}`);o+=e.labels[0].height,c+=h(e.labels[1],a,o,` class="pele-c4-type" font-size="${y}" fill="var(--_m)"${i.text}`),o+=e.labels[1].height,c+=h(e.labels[2],a,o,` class="pele-c4-descr" font-size="${y}" fill="var(--_m)"${i.text}`),H+=`<g class="pele-cluster pele-c4-${t.nodeType?`node`:`boundary`}" data-id="${r(t.alias)}"><rect x="${s(e.x)}" y="${s(e.y)}" width="${s(e.w)}" height="${s(e.h)}" fill="none" stroke="var(--_b)"${t.nodeType?``:` stroke-dasharray="6 4"`}${n(i.shape)}/>`+Re(c,t.link,t.alias,C,p)+`</g>`}for(let t of e.nodes){let e=t.shape,n=e.kind.startsWith(`external`),a=Le(e.bgColor,e.borderColor,e.fontColor),o=` stroke="var(--_b)"`+(n?` stroke-dasharray="4 3"`:``),{w:c,h:l,form:u,labels:d}=t,m=u===`h-cyl`?-oe(l)/2:0,h=u===`person`?ie/2:u===`cyl`?ae(c)/2:0,g=` fill="var(--_m)"${a.text}`,_=h-t.textH/2,v=i(d[0],m,_+d[0].height/2,` class="pele-c4-type" font-size="${y-1}"${g}`);_+=d[0].height,v+=i(d[1],m,_+d[1].height/2,` class="pele-label" font-weight="var(--_hw)"${a.text}`),_+=d[1].height,v+=i(d[2],m,_+d[2].height/2,` class="pele-c4-techn" font-size="${y}"${g}`),_+=d[2].height+4,v+=i(d[3],m,_+d[3].height/2,` class="pele-c4-descr" font-size="${y}"${a.text}`),U+=`<g class="pele-node pele-shape-${u} pele-c4-${e.kind}${n?` pele-c4-external`:``}" data-id="${r(e.alias)}" transform="translate(${s(t.x+c/2)},${s(t.y+l/2)})">`+Re(f(u,c,l,` fill="var(${n?`--_bg`:`--_s`})"${o}${a.shape}`,o+a.line)+v,e.link,e.alias,C,p)+`</g>`}}let W=o(a.title,!1,x,v,m?l(p):4e3,1),G=W.height>0?W.height+12:0,K=Math.max(k-D,W.width),q=Math.ceil(K+2*S),J=Math.ceil(A-O+G+2*S),Y=S-D+(K-(k-D))/2,ce=S+G-O;return[{svg:e(`c4`,q,J,v,p,a,i(W,q/2,S+W.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="translate(${s(Y)},${s(ce)})">`+(H?`<g class="pele-clusters">${H}</g>`:``)+(L?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round">${L}</g>`:``)+(U?`<g class="pele-nodes">${U}</g>`:``)+(V?`<g class="pele-edge-labels" font-size="${y}">${V}</g>`:``)+`</g>`),width:q,height:J,links:C},R.squeezed]}var Ve={type:`c4`,parse(e,t,n){let r=new D;return n&&(r.title=n),R(e,r),r},render:ze};export{Ve as c4};
@@ -0,0 +1 @@
1
+ import{$ as e,B as t,E as n,F as r,H as i,J as a,N as o,R as s,at as c,d as l,dt as u,f as d,ht as f,i as p,it as m,j as h,k as g,nt as _,ot as v,tt as y,u as b,ut as x,y as S,z as C}from"./Cz6kYWmu.js";import"./xihTtKlq.js";import{t as w}from"./CqmdC7Q3.js";import{i as T}from"./D4nFtMQC.js";var E=e=>e.kind===`passage`?`passage:${e.id}:${e.text}`:`${e.kind}:${e.id}`,D=new class{#e=c([]);get parts(){return i(this.#e)}set parts(e){m(this.#e,e)}#t=c(``);get fresh(){return i(this.#t)}set fresh(e){m(this.#t,e,!0)}#n=c(null);get carrying(){return i(this.#n)}set carrying(e){m(this.#n,e)}has(e,t){return this.parts.some(n=>n.kind===e&&n.id===t)}add(e){return!this.parts.some(t=>E(t)===E(e))&&(this.parts=[...this.parts,e],this.fresh=E(e),T.focus!==`iso`&&T.unseen++,!0)}onRemove=null;remove(e){let t=this.parts.some(t=>E(t)===E(e));this.parts=this.parts.filter(t=>E(t)!==E(e)),t&&this.onRemove?.(e)}toggle(e){return this.parts.some(t=>E(t)===E(e))?(this.remove(e),!1):(this.add(e),!0)}clear(){this.parts=[]}get sent(){return this.parts}keyOf=E},O=r(`<li role="option"><button type="button" tabindex="-1" class="svelte-35e6rs"><span class="dir svelte-35e6rs"> </span><span class="detail svelte-35e6rs"> </span></button></li>`),k=r(`<ul class="suggest svelte-35e6rs" role="listbox" aria-label="folders"></ul>`),A=r(`<span class="field-wrap svelte-35e6rs"><input autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list"/> <!></span>`);function j(r,s){u(s,!0);let T=p(s,`value`,15,``),E=p(s,`placeholder`,3,``),D=p(s,`id`,3,`folder`),j=p(s,`quiet`,3,!1),M=c(!1),N=c(0),P=v(()=>T().trim().replace(/^\/+|\/+$/g,``).toLowerCase()),F=e=>w.listing.notes.filter(t=>t.dir===e).length,I=v(()=>{let e=w.listing.dirs.filter(e=>e.toLowerCase().includes(i(P))),t=e=>e.split(`/`).at(-1).toLowerCase().startsWith(i(P))?0:e.toLowerCase().startsWith(i(P))?1:2,n=e.sort((e,n)=>t(e)-t(n)||e.localeCompare(n)).map(e=>({dir:e,made:!1}));return i(P)&&!w.listing.dirs.some(e=>e.toLowerCase()===i(P))&&n.push({dir:T().trim().replace(/^\/+|\/+$/g,``),made:!0}),n.slice(0,8)});function L(e){T(e),m(M,!1),s.onpick?.(e)}function R(e){if(i(M)&&i(I).length){if(e.key===`ArrowDown`){m(N,(i(N)+1)%i(I).length),e.preventDefault();return}if(e.key===`ArrowUp`){m(N,(i(N)-1+i(I).length)%i(I).length),e.preventDefault();return}if((e.key===`Enter`||e.key===`Tab`)&&i(I)[i(N)]&&(e.key===`Enter`||i(P))){e.key===`Enter`&&e.preventDefault(),L(i(I)[i(N)].dir);return}if(e.key===`Escape`){m(M,!1),e.stopPropagation();return}}s.onkeydown?.(e)}var z=A(),B=e(z);l(B);let V;var H=_(B,2),U=r=>{var s=k();n(s,23,()=>i(I),e=>e.dir+e.made,(n,r,s)=>{var c=O();let l;var u=e(c),p=e(u),g=y(p,!0),v=_(p),b=y(v,!0);f(u),f(c),a(e=>{d(c,`id`,`${D()??``}-opt-${i(s)??``}`),d(c,`aria-selected`,i(s)===i(N)),l=S(c,1,`svelte-35e6rs`,null,l,{at:i(s)===i(N)}),h(g,i(r).dir),h(b,e)},[()=>i(r).made?`new folder`:`${F(i(r).dir)} ${F(i(r).dir)===1?`note`:`notes`}`]),C(`mousedown`,u,e=>e.preventDefault()),C(`click`,u,()=>L(i(r).dir)),t(`mouseenter`,u,()=>m(N,i(s),!0)),o(n,c)}),f(s),a(()=>d(s,`id`,`${D()??``}-list`)),o(r,s)};g(H,e=>{i(M)&&i(I).length&&e(U)}),f(z),a(()=>{d(B,`id`,D()),V=S(B,1,`mono svelte-35e6rs`,null,V,{field:!j(),quiet:j()}),d(B,`placeholder`,E()),d(B,`aria-label`,s.label),d(B,`aria-expanded`,i(M)&&i(I).length>0),d(B,`aria-controls`,`${D()??``}-list`),d(B,`aria-activedescendant`,i(M)&&i(I)[i(N)]?`${D()}-opt-${i(N)}`:void 0)}),t(`focus`,B,()=>{m(M,!0),m(N,0)}),C(`input`,B,()=>{m(M,!0),m(N,0)}),t(`blur`,B,()=>setTimeout(()=>m(M,!1),120)),C(`keydown`,B,R),b(B,T),o(r,z),x()}s([`input`,`keydown`,`mousedown`,`click`]);export{D as n,j as t};