@marimo-team/frontend 0.10.15-dev7 → 0.10.15

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 (87) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-BsAo0-TZ.js → ConnectedDataExplorerComponent-DPTcJ2Ue.js} +1 -1
  2. package/dist/assets/{VegaLite-Cbzyxk3b.js → VegaLite-RFaMP3Qr.js} +1 -1
  3. package/dist/assets/{_baseEach-BSQ4SVv_.js → _baseEach-D8i6mmF0.js} +1 -1
  4. package/dist/assets/_baseMap-eA-7mWiZ.js +1 -0
  5. package/dist/assets/{_baseUniq-BRVQVHd9.js → _baseUniq-CoqlYLqT.js} +1 -1
  6. package/dist/assets/{any-language-editor-Bmab2tvk.js → any-language-editor-BTSMSVvh.js} +1 -1
  7. package/dist/assets/{architectureDiagram-IFBEXTG3-DqL9-7YS.js → architectureDiagram-IFBEXTG3-B9_9n0aY.js} +1 -1
  8. package/dist/assets/{blockDiagram-TCMKQVZ6-BL91G_q9.js → blockDiagram-TCMKQVZ6-DdmYQ5EC.js} +1 -1
  9. package/dist/assets/{c4Diagram-ZCSEYPFN-CdR5qUeZ.js → c4Diagram-ZCSEYPFN-CGnnvbgD.js} +1 -1
  10. package/dist/assets/channel-ICAp7FrE.js +1 -0
  11. package/dist/assets/{chunk-4LC2V6XN-DVwdU5cE.js → chunk-4LC2V6XN-D1FXQq7Z.js} +1 -1
  12. package/dist/assets/{chunk-5RIWM3LS-DrCuURXF.js → chunk-5RIWM3LS-DhuZI4mA.js} +1 -1
  13. package/dist/assets/{chunk-6JKP7OK7-BO0X8FD4.js → chunk-6JKP7OK7-sUk_-0X9.js} +1 -1
  14. package/dist/assets/{chunk-NGC4727B-C9HentDi.js → chunk-NGC4727B-BOswEICR.js} +1 -1
  15. package/dist/assets/{chunk-REEJFE46-L4qE4XvS.js → chunk-REEJFE46-BgZhWgfz.js} +1 -1
  16. package/dist/assets/{chunk-RYO7GUH3-Bvn-G3GO.js → chunk-RYO7GUH3-B-XlgDM2.js} +1 -1
  17. package/dist/assets/{chunk-V35ELUW5-DVMXhSfZ.js → chunk-V35ELUW5-DoVD0pnz.js} +1 -1
  18. package/dist/assets/{classDiagram-Q73GJZWF-BlrWTxLg.js → classDiagram-Q73GJZWF-ImaihzKw.js} +1 -1
  19. package/dist/assets/{classDiagram-v2-C6QPLPW4-DaTUsa7r.js → classDiagram-v2-C6QPLPW4-HhF49SVa.js} +1 -1
  20. package/dist/assets/clone-CgygiSo_.js +1 -0
  21. package/dist/assets/{compile-CBuFhssM.js → compile-hxmSbHOR.js} +1 -1
  22. package/dist/assets/{createWsUrl-BBkfPDEr.js → createWsUrl-DmsU7tsF.js} +1 -1
  23. package/dist/assets/{dagre-7KT5K2WU-CrpJyJza.js → dagre-7KT5K2WU-DEFltSBL.js} +1 -1
  24. package/dist/assets/{data-editor-BYyj0d-K.js → data-editor-CjFgi59V.js} +1 -1
  25. package/dist/assets/{diagram-AVGMFHF7-DHIYGumX.js → diagram-AVGMFHF7-BYl599fu.js} +1 -1
  26. package/dist/assets/{edit-page-crbLCICq.js → edit-page-_vaMMI4T.js} +3 -3
  27. package/dist/assets/{erDiagram-DKC2X5TE-CNIVhE5g.js → erDiagram-DKC2X5TE-BdW7Pf8a.js} +1 -1
  28. package/dist/assets/{flowDiagram-NWEUNK3L-BZ4gF99E.js → flowDiagram-NWEUNK3L-kUVyufcx.js} +1 -1
  29. package/dist/assets/{ganttDiagram-HLVPPPRE-DrOY6sfK.js → ganttDiagram-HLVPPPRE-DOG2eQEb.js} +1 -1
  30. package/dist/assets/{gitGraph-YCYPL57B-CGup_tZ1.js → gitGraph-YCYPL57B-EOxeMMXY.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-JPZ3KUXI-JzOXWn5_.js → gitGraphDiagram-JPZ3KUXI-BuyRkw3Z.js} +1 -1
  32. package/dist/assets/{graph-BMenLjsK.js → graph-Bn_1ovuo.js} +1 -1
  33. package/dist/assets/{home-page-DL-7wX9r.js → home-page-DK5l2WRj.js} +1 -1
  34. package/dist/assets/{index-DebFD1P9.js → index-B0DTG1Hw.js} +1 -1
  35. package/dist/assets/{index-BBmDbzar.js → index-B6eHd7Yp.js} +1 -1
  36. package/dist/assets/{index-BBgpPwkg.js → index-BKbDf_Y2.js} +1 -1
  37. package/dist/assets/{index-CkYrCMmy.js → index-BRYifMPo.js} +1 -1
  38. package/dist/assets/{index-BmoO0ICT.js → index-BTmvn_00.js} +1 -1
  39. package/dist/assets/{index-Dq_wCYK6.js → index-Bd7ZnnG6.js} +1 -1
  40. package/dist/assets/{index-onFz0Hzk.js → index-Bdm-3pii.js} +1 -1
  41. package/dist/assets/{index-VjHugB9l.js → index-BoFktD3i.js} +1 -1
  42. package/dist/assets/{index-C7T2WbaZ.js → index-CBTGzAQH.js} +1 -1
  43. package/dist/assets/{index-Dsnc3iDz.js → index-CH2xAtFU.js} +1 -1
  44. package/dist/assets/{index-Dsw82KoD.js → index-D2UJCvvQ.js} +1 -1
  45. package/dist/assets/{index-CbrsO-BL.js → index-D5wpR8Oz.js} +1 -1
  46. package/dist/assets/{index-Jdn_xFy4.js → index-DLlmMUlk.js} +1 -1
  47. package/dist/assets/index-DtPBW9Ge.js +79 -0
  48. package/dist/assets/{index-DOscTpCC.js → index-Ek4tc-6b.js} +1 -1
  49. package/dist/assets/{index-C4RktzAO.js → index-XJATNR-S.js} +1 -1
  50. package/dist/assets/{index-7lZAxQEl.js → index-Y6hOqSjn.js} +1 -1
  51. package/dist/assets/{infoDiagram-RZZSJVI2-E03OsOh5.js → infoDiagram-RZZSJVI2-Cq96ilc7.js} +1 -1
  52. package/dist/assets/{journeyDiagram-BLD6N6MZ-BtyuL1yZ.js → journeyDiagram-BLD6N6MZ-DN28UkRB.js} +1 -1
  53. package/dist/assets/{json-B8MCFVhe.js → json-CK57ScLY.js} +1 -1
  54. package/dist/assets/katex-DEYOxkAH.js +1 -0
  55. package/dist/assets/{layout-BnpzrhGZ.js → layout-DTgqPc5U.js} +1 -1
  56. package/dist/assets/{linear-De0S1ro-.js → linear-BpDp71Jt.js} +1 -1
  57. package/dist/assets/{mermaid-M1H1kDcl.js → mermaid-Cp0kZaTQ.js} +3 -3
  58. package/dist/assets/{mhchem-B1ca-zvM.js → mhchem-mael6lYf.js} +1 -1
  59. package/dist/assets/{min-C5A3NmZ1.js → min-DuxL3nvs.js} +1 -1
  60. package/dist/assets/{mindmap-definition-OEB2RXX2-Dr_wtXBE.js → mindmap-definition-OEB2RXX2-DmLuGXVG.js} +1 -1
  61. package/dist/assets/{pieDiagram-X7YZ5ZEZ-DG-ISu2I.js → pieDiagram-X7YZ5ZEZ-DvTkqgNS.js} +1 -1
  62. package/dist/assets/{quadrantDiagram-F36EZAVT-BcPY1EHH.js → quadrantDiagram-F36EZAVT-nosqxkzn.js} +1 -1
  63. package/dist/assets/{react-plotly-CccfCShi.js → react-plotly-DvljR3WU.js} +1 -1
  64. package/dist/assets/{requirementDiagram-JG2LMPGF-Baa5Kjsc.js → requirementDiagram-JG2LMPGF-CNwwyJl7.js} +1 -1
  65. package/dist/assets/{run-page-CuCD7tWT.js → run-page-BhNUt9ag.js} +1 -1
  66. package/dist/assets/{sankeyDiagram-ATFNWWW6-DD1AdWcm.js → sankeyDiagram-ATFNWWW6-CNqP0uKq.js} +1 -1
  67. package/dist/assets/{sequenceDiagram-WK7YDQ3N-DIYgCA-2.js → sequenceDiagram-WK7YDQ3N-OYmYOfkn.js} +1 -1
  68. package/dist/assets/{slides-component-4DgyrNmq.js → slides-component-C0TxV7EY.js} +1 -1
  69. package/dist/assets/{sortBy-Bki__Qw6.js → sortBy-DUhuVQfk.js} +1 -1
  70. package/dist/assets/{stateDiagram-4JV6CC6H-CzSyb5SP.js → stateDiagram-4JV6CC6H-DA7grtZa.js} +1 -1
  71. package/dist/assets/stateDiagram-v2-7KT6RKTD-CdmL-XcD.js +1 -0
  72. package/dist/assets/{terminal-Bz-YUgad.js → terminal-n33CAe6b.js} +1 -1
  73. package/dist/assets/{time-ClrMLZRx.js → time-DKLM0YDh.js} +1 -1
  74. package/dist/assets/{timeline-definition-3ZMEY6HS-mlLHcZY9.js → timeline-definition-3ZMEY6HS-CaAqk_hV.js} +1 -1
  75. package/dist/assets/tree-BYJnQFb_.js +14 -0
  76. package/dist/assets/{useMarimoWebSocket-D7Ed6Dez.js → useMarimoWebSocket-2IqxyeWx.js} +4 -4
  77. package/dist/assets/{vega-component-wtweVtHD.js → vega-component-CODqRt6w.js} +1 -1
  78. package/dist/assets/{xychartDiagram-KECQ2H5Q-DTg5x0LQ.js → xychartDiagram-KECQ2H5Q-CE6Z7ZXD.js} +1 -1
  79. package/dist/index.html +1 -1
  80. package/package.json +1 -1
  81. package/dist/assets/_baseMap-B87hcp6h.js +0 -1
  82. package/dist/assets/channel-Cgwe3aYo.js +0 -1
  83. package/dist/assets/clone-B_Mv0xNl.js +0 -1
  84. package/dist/assets/index-Tczrz6gD.js +0 -79
  85. package/dist/assets/katex-D1MatCUS.js +0 -1
  86. package/dist/assets/stateDiagram-v2-7KT6RKTD-Be1SCL9O.js +0 -1
  87. package/dist/assets/tree-Bz-GMq3G.js +0 -14
@@ -1 +1 @@
1
- import{a as e,i as c,h as O,f as o,b as r,s as n,t,L as Q,e as s}from"./index-Tczrz6gD.js";const $={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},a=s.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"/Q~R^XY}YZ}]^}pq}rs!Stu!qxy&Vyz'S{|'X}!O'X!Q!R'b!R![)_!]!^,{#T#o-^~!SO_~~!VTOr!Srs!fs#O!S#O#P!k#P~!S~!kOZ~~!nPO~!S~!tiqr$cst$ctu$cuv$cvw$cwx$cz{$c{|$c}!O$c!O!P$c!P!Q$c!Q![$c![!]$c!^!_$c!_!`$c!`!a$c!a!b$c!b!c$c!c!}$c#Q#R$c#R#S$c#S#T$c#T#o$c#p#q$c#r#s$c~$hiV~qr$cst$ctu$cuv$cvw$cwx$cz{$c{|$c}!O$c!O!P$c!P!Q$c!Q![$c![!]$c!^!_$c!_!`$c!`!a$c!a!b$c!b!c$c!c!}$c#Q#R$c#R#S$c#S#T$c#T#o$c#p#q$c#r#s$c~&[PT~!]!^&_~&bRO!]&_!]!^&k!^~&_~&nTOy&_yz&}z!]&_!]!^&k!^~&_~'SOQ~~'XOS~~'[Q!Q!R'b!R![)_~'gUY~!O!P'y!Q![)_!g!h(j#R#S)s#X#Y(j#l#m)y~(ORY~!Q![(X!g!h(j#X#Y(j~(^SY~!Q![(X!g!h(j#R#S)X#X#Y(j~(mR{|(v}!O(v!Q![(|~(yP!Q![(|~)RQY~!Q![(|#R#S(v~)[P!Q![(X~)dTY~!O!P'y!Q![)_!g!h(j#R#S)s#X#Y(j~)vP!Q![)_~)|R!Q![*V!c!i*V#T#Z*V~*[VY~!O!P*q!Q![*V!c!i*V!r!s+n#R#S)y#T#Z*V#d#e+n~*vTY~!Q![+V!c!i+V!r!s+n#T#Z+V#d#e+n~+[UY~!Q![+V!c!i+V!r!s+n#R#S,o#T#Z+V#d#e+n~+qT{|,Q}!O,Q!Q![,^!c!i,^#T#Z,^~,TR!Q![,^!c!i,^#T#Z,^~,cSY~!Q![,^!c!i,^#R#S,Q#T#Z,^~,rR!Q![+V!c!i+V#T#Z+V~-OP!]!^-R~-WQP~OY-RZ~-R~-ciX~qr-^st-^tu-^uv-^vw-^wx-^z{-^{|-^}!O-^!O!P-^!P!Q-^!Q![-^![!]-^!^!_-^!_!`-^!`!a-^!a!b-^!b!c-^!c!}-^#Q#R-^#R#S-^#S#T-^#T#o-^#p#q-^#r#s-^",tokenizers:[0],topRules:{Module:[0,3]},specialized:[{term:9,get:e=>$[e]||-1}],tokenPrec:0}),P=e.define({name:"wast",parser:a.configure({props:[c.add({App:O({closing:")",align:!1})}),o.add({App:r,BlockComment:e=>({from:e.from+2,to:e.to-2})}),n({Keyword:t.keyword,Type:t.typeName,Number:t.number,String:t.string,Identifier:t.variableName,LineComment:t.lineComment,BlockComment:t.blockComment,"( )":t.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function i(){return new Q(P)}export{i as wast,P as wastLanguage};
1
+ import{a as e,i as c,h as O,f as o,b as r,s as n,t,L as Q,e as s}from"./index-DtPBW9Ge.js";const $={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},a=s.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"/Q~R^XY}YZ}]^}pq}rs!Stu!qxy&Vyz'S{|'X}!O'X!Q!R'b!R![)_!]!^,{#T#o-^~!SO_~~!VTOr!Srs!fs#O!S#O#P!k#P~!S~!kOZ~~!nPO~!S~!tiqr$cst$ctu$cuv$cvw$cwx$cz{$c{|$c}!O$c!O!P$c!P!Q$c!Q![$c![!]$c!^!_$c!_!`$c!`!a$c!a!b$c!b!c$c!c!}$c#Q#R$c#R#S$c#S#T$c#T#o$c#p#q$c#r#s$c~$hiV~qr$cst$ctu$cuv$cvw$cwx$cz{$c{|$c}!O$c!O!P$c!P!Q$c!Q![$c![!]$c!^!_$c!_!`$c!`!a$c!a!b$c!b!c$c!c!}$c#Q#R$c#R#S$c#S#T$c#T#o$c#p#q$c#r#s$c~&[PT~!]!^&_~&bRO!]&_!]!^&k!^~&_~&nTOy&_yz&}z!]&_!]!^&k!^~&_~'SOQ~~'XOS~~'[Q!Q!R'b!R![)_~'gUY~!O!P'y!Q![)_!g!h(j#R#S)s#X#Y(j#l#m)y~(ORY~!Q![(X!g!h(j#X#Y(j~(^SY~!Q![(X!g!h(j#R#S)X#X#Y(j~(mR{|(v}!O(v!Q![(|~(yP!Q![(|~)RQY~!Q![(|#R#S(v~)[P!Q![(X~)dTY~!O!P'y!Q![)_!g!h(j#R#S)s#X#Y(j~)vP!Q![)_~)|R!Q![*V!c!i*V#T#Z*V~*[VY~!O!P*q!Q![*V!c!i*V!r!s+n#R#S)y#T#Z*V#d#e+n~*vTY~!Q![+V!c!i+V!r!s+n#T#Z+V#d#e+n~+[UY~!Q![+V!c!i+V!r!s+n#R#S,o#T#Z+V#d#e+n~+qT{|,Q}!O,Q!Q![,^!c!i,^#T#Z,^~,TR!Q![,^!c!i,^#T#Z,^~,cSY~!Q![,^!c!i,^#R#S,Q#T#Z,^~,rR!Q![+V!c!i+V#T#Z+V~-OP!]!^-R~-WQP~OY-RZ~-R~-ciX~qr-^st-^tu-^uv-^vw-^wx-^z{-^{|-^}!O-^!O!P-^!P!Q-^!Q![-^![!]-^!^!_-^!_!`-^!`!a-^!a!b-^!b!c-^!c!}-^#Q#R-^#R#S-^#S#T-^#T#o-^#p#q-^#r#s-^",tokenizers:[0],topRules:{Module:[0,3]},specialized:[{term:9,get:e=>$[e]||-1}],tokenPrec:0}),P=e.define({name:"wast",parser:a.configure({props:[c.add({App:O({closing:")",align:!1})}),o.add({App:r,BlockComment:e=>({from:e.from+2,to:e.to-2})}),n({Keyword:t.keyword,Type:t.typeName,Number:t.number,String:t.string,Identifier:t.variableName,LineComment:t.lineComment,BlockComment:t.blockComment,"( )":t.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function i(){return new Q(P)}export{i as wast,P as wastLanguage};
@@ -1 +1 @@
1
- import{_ as r,l as s,G as t,j as a,H as e}from"./mermaid-M1H1kDcl.js";import{p as i}from"./gitGraph-YCYPL57B-CGup_tZ1.js";import"./index-Tczrz6gD.js";import"./transform-C6EuPmuu.js";import"./step-DY8hpDjU.js";import"./main-cdvIQCIX.js";import"./_baseEach-BSQ4SVv_.js";import"./_baseUniq-BRVQVHd9.js";import"./min-C5A3NmZ1.js";import"./_baseMap-B87hcp6h.js";import"./clone-B_Mv0xNl.js";var o={version:e},n={parser:{parse:r((async r=>{const t=await i("info",r);s.debug(t)}),"parse")},db:{getVersion:r((()=>o.version),"getVersion")},renderer:{draw:r(((r,e,i)=>{s.debug("rendering info diagram\n"+r);const o=t(e);a(o,100,400,!0);o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)}),"draw")}};export{n as diagram};
1
+ import{_ as r,l as s,G as t,j as a,H as e}from"./mermaid-Cp0kZaTQ.js";import{p as i}from"./gitGraph-YCYPL57B-EOxeMMXY.js";import"./index-DtPBW9Ge.js";import"./transform-C6EuPmuu.js";import"./step-DY8hpDjU.js";import"./main-cdvIQCIX.js";import"./_baseEach-D8i6mmF0.js";import"./_baseUniq-CoqlYLqT.js";import"./min-DuxL3nvs.js";import"./_baseMap-eA-7mWiZ.js";import"./clone-CgygiSo_.js";var o={version:e},n={parser:{parse:r((async r=>{const t=await i("info",r);s.debug(t)}),"parse")},db:{getVersion:r((()=>o.version),"getVersion")},renderer:{draw:r(((r,e,i)=>{s.debug("rendering info diagram\n"+r);const o=t(e);a(o,100,400,!0);o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)}),"draw")}};export{n as diagram};
@@ -1 +1 @@
1
- import{d as t,f as e,g as n,b as i}from"./chunk-V35ELUW5-DVMXhSfZ.js";import{_ as s,d as r,p as a,q as o,s as c,g as l,c as h,b as u,t as p,j as y}from"./mermaid-M1H1kDcl.js";import{s as d}from"./transform-C6EuPmuu.js";import{d as f}from"./arc-y9WbYkJu.js";import"./index-Tczrz6gD.js";import"./step-DY8hpDjU.js";var g=function(){var t=s((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:s((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:s((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),s(m,"lex");for(var x,k,_,b,v,w,$,T,M={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=o[k]&&o[k][x]),void 0===_||!_.length||!_[0]){var S="";for(v in T=[],o[k])this.terminals_[v]&&v>2&&T.push("'"+this.terminals_[v]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:T})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),x=null,h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(w=this.productions_[_[1]][1],M.$=r[r.length-w],M._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},g&&(M._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(M,[c,h,l,y.yy,_[1],r,a].concat(u))))return b;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[_[1]][0]),r.push(M.$),a.push(M._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:s((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:s((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:s((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:s((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:s((function(){return this._more=!0,this}),"more"),reject:s((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:s((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:s((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:s((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:s((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:s((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:s((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:s((function(){var t=this.next();return t||this.lex()}),"lex"),begin:s((function(t){this.conditionStack.push(t)}),"begin"),popState:s((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:s((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:s((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:s((function(t){this.begin(t)}),"pushState"),stateStackSize:s((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:s((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,s(u,"Parser"),u.prototype=l,l.Parser=u,new u}();g.parser=g;var m=g,x="",k=[],_=[],b=[],v=s((function(){k.length=0,_.length=0,x="",b.length=0,p()}),"clear"),w=s((function(t){x=t,k.push(t)}),"addSection"),$=s((function(){return k}),"getSections"),T=s((function(){let t=A();let e=0;for(;!t&&e<100;)t=A(),e++;return _.push(...b),_}),"getTasks"),M=s((function(){const t=[];_.forEach((e=>{e.people&&t.push(...e.people)}));return[...new Set(t)].sort()}),"updateActors"),S=s((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:x,type:x,people:r,task:t,score:i};b.push(a)}),"addTask"),E=s((function(t){const e={section:x,type:x,description:t,task:t,classes:[]};_.push(e)}),"addTaskOrg"),A=s((function(){const t=s((function(t){return b[t].processed}),"compileTask");let e=!0;for(const[n,i]of b.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),I=s((function(){return M()}),"getActors"),P={getConfig:s((()=>r().journey),"getConfig"),clear:v,setDiagramTitle:a,getDiagramTitle:o,setAccTitle:c,getAccTitle:l,setAccDescription:h,getAccDescription:u,addSection:w,getSections:$,getTasks:T,addTask:S,addTaskOrg:E,getActors:I},j=s((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),C=s((function(e,n){return t(e,n)}),"drawRect"),V=s((function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=f().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const i=f().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s(a,"smile"),s(o,"sad"),s(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),i}),"drawFace"),L=s((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),O=s((function(t,n){return e(t,n)}),"drawText"),F=s((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}s(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,O(t,e)}),"drawLabel"),B=s((function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,C(s,r),z(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)}),"drawSection"),D=-1,N=s((function(t,e,i){const s=e.x+i.width/2,r=t.append("g");D++;r.append("line").attr("id","task"+D).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),V(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=n();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,C(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};L(r,i),o+=10})),z(i)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)}),"drawTask"),R=s((function(t,e){i(t,e)}),"drawBackgroundRect"),z=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,c=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",u);c.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),c.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,s,r,a,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,c,l),i(u,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return s(t,"byText"),s(e,"byTspan"),s(n,"byFo"),s(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Y={drawRect:C,drawCircle:L,drawSection:B,drawText:O,drawLabel:F,drawTask:N,drawBackgroundRect:R,initGraphics:s((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}),"initGraphics")},W=s((function(t){Object.keys(t).forEach((function(e){G[e]=t[e]}))}),"setConf"),q={};function X(t){const e=r().journey;let n=60;Object.keys(q).forEach((i=>{const s=q[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:q[i].position};Y.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Y.drawText(t,a),n+=20}))}s(X,"drawActorLegend");var G=r().journey,U=G.leftMargin,H=s((function(t,e,n,i){const s=r().journey,a=r().securityLevel;let o;"sandbox"===a&&(o=d("#i"+e));const c=d("sandbox"===a?o.nodes()[0].contentDocument.body:"body");Z.init();const l=c.select("#"+e);Y.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),p=i.db.getActors();for(const r in q)delete q[r];let f=0;p.forEach((t=>{q[t]={color:s.actorColours[f%s.actorColours.length],position:f},f++})),X(l),Z.insert(0,0,U,50*Object.keys(q).length),Q(l,h,0);const g=Z.getBounds();u&&l.append("text").text(u).attr("x",U).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=g.stopy-g.starty+2*s.diagramMarginY,x=U+g.stopx+2*s.diagramMarginX;y(l,m,x,s.useMaxWidth),l.append("line").attr("x1",U).attr("y1",4*s.height).attr("x2",x-U-4).attr("y2",4*s.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=u?70:0;l.attr("viewBox",`${g.startx} -25 ${x} ${m+k}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+k+25)}),"draw"),Z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:s((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:s((function(t,e,n,i){const a=r().journey,o=this;let c=0;function l(r){return s((function(s){c++;const l=o.sequenceItems.length-c+1;o.updateVal(s,"starty",e-l*a.boxMargin,Math.min),o.updateVal(s,"stopy",i+l*a.boxMargin,Math.max),o.updateVal(Z.data,"startx",t-l*a.boxMargin,Math.min),o.updateVal(Z.data,"stopx",n+l*a.boxMargin,Math.max),"activation"!==r&&(o.updateVal(s,"startx",t-l*a.boxMargin,Math.min),o.updateVal(s,"stopx",n+l*a.boxMargin,Math.max),o.updateVal(Z.data,"starty",e-l*a.boxMargin,Math.min),o.updateVal(Z.data,"stopy",i+l*a.boxMargin,Math.max))}),"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())}),"updateBounds"),insert:s((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Z.data,"startx",s,Math.min),this.updateVal(Z.data,"starty",a,Math.min),this.updateVal(Z.data,"stopx",r,Math.max),this.updateVal(Z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:s((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:s((function(){return this.verticalPos}),"getVerticalPos"),getBounds:s((function(){return this.data}),"getBounds")},J=G.sectionFills,K=G.sectionColours,Q=s((function(t,e,n){const i=r().journey;let s="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[r,u]of e.entries()){if(s!==u.section){c=J[o%J.length],h=o%J.length,l=K[o%K.length];let n=0;const a=u.section;for(let t=r;t<e.length&&e[t].section==a;t++)n+=1;const p={x:r*i.taskMargin+r*i.width+U,y:50,text:u.section,fill:c,num:h,colour:l,taskCount:n};Y.drawSection(t,p,i),s=u.section,o++}const n=u.people.reduce(((t,e)=>(q[e]&&(t[e]=q[e]),t)),{});u.x=r*i.taskMargin+r*i.width+U,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=l,u.fill=c,u.num=h,u.actors=n,Y.drawTask(t,u,i),Z.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}}),"drawTasks"),tt={setConf:W,draw:H},et={parser:m,db:P,renderer:tt,styles:j,init:s((t=>{tt.setConf(t.journey),P.clear()}),"init")};export{et as diagram};
1
+ import{d as t,f as e,g as n,b as i}from"./chunk-V35ELUW5-DoVD0pnz.js";import{_ as s,d as r,p as a,q as o,s as c,g as l,c as h,b as u,t as p,j as y}from"./mermaid-Cp0kZaTQ.js";import{s as d}from"./transform-C6EuPmuu.js";import{d as f}from"./arc-y9WbYkJu.js";import"./index-DtPBW9Ge.js";import"./step-DY8hpDjU.js";var g=function(){var t=s((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:s((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:s((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),s(m,"lex");for(var x,k,_,b,v,w,$,T,M={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=o[k]&&o[k][x]),void 0===_||!_.length||!_[0]){var S="";for(v in T=[],o[k])this.terminals_[v]&&v>2&&T.push("'"+this.terminals_[v]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:T})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),x=null,h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(w=this.productions_[_[1]][1],M.$=r[r.length-w],M._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},g&&(M._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(M,[c,h,l,y.yy,_[1],r,a].concat(u))))return b;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[_[1]][0]),r.push(M.$),a.push(M._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:s((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:s((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:s((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:s((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:s((function(){return this._more=!0,this}),"more"),reject:s((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:s((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:s((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:s((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:s((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:s((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:s((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:s((function(){var t=this.next();return t||this.lex()}),"lex"),begin:s((function(t){this.conditionStack.push(t)}),"begin"),popState:s((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:s((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:s((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:s((function(t){this.begin(t)}),"pushState"),stateStackSize:s((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:s((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,s(u,"Parser"),u.prototype=l,l.Parser=u,new u}();g.parser=g;var m=g,x="",k=[],_=[],b=[],v=s((function(){k.length=0,_.length=0,x="",b.length=0,p()}),"clear"),w=s((function(t){x=t,k.push(t)}),"addSection"),$=s((function(){return k}),"getSections"),T=s((function(){let t=A();let e=0;for(;!t&&e<100;)t=A(),e++;return _.push(...b),_}),"getTasks"),M=s((function(){const t=[];_.forEach((e=>{e.people&&t.push(...e.people)}));return[...new Set(t)].sort()}),"updateActors"),S=s((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:x,type:x,people:r,task:t,score:i};b.push(a)}),"addTask"),E=s((function(t){const e={section:x,type:x,description:t,task:t,classes:[]};_.push(e)}),"addTaskOrg"),A=s((function(){const t=s((function(t){return b[t].processed}),"compileTask");let e=!0;for(const[n,i]of b.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),I=s((function(){return M()}),"getActors"),P={getConfig:s((()=>r().journey),"getConfig"),clear:v,setDiagramTitle:a,getDiagramTitle:o,setAccTitle:c,getAccTitle:l,setAccDescription:h,getAccDescription:u,addSection:w,getSections:$,getTasks:T,addTask:S,addTaskOrg:E,getActors:I},j=s((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),C=s((function(e,n){return t(e,n)}),"drawRect"),V=s((function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=f().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const i=f().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s(a,"smile"),s(o,"sad"),s(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),i}),"drawFace"),L=s((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),O=s((function(t,n){return e(t,n)}),"drawText"),F=s((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}s(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,O(t,e)}),"drawLabel"),B=s((function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,C(s,r),z(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)}),"drawSection"),D=-1,N=s((function(t,e,i){const s=e.x+i.width/2,r=t.append("g");D++;r.append("line").attr("id","task"+D).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),V(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=n();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,C(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};L(r,i),o+=10})),z(i)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)}),"drawTask"),R=s((function(t,e){i(t,e)}),"drawBackgroundRect"),z=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,c=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",u);c.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),c.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,s,r,a,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,c,l),i(u,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return s(t,"byText"),s(e,"byTspan"),s(n,"byFo"),s(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Y={drawRect:C,drawCircle:L,drawSection:B,drawText:O,drawLabel:F,drawTask:N,drawBackgroundRect:R,initGraphics:s((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}),"initGraphics")},W=s((function(t){Object.keys(t).forEach((function(e){G[e]=t[e]}))}),"setConf"),q={};function X(t){const e=r().journey;let n=60;Object.keys(q).forEach((i=>{const s=q[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:q[i].position};Y.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Y.drawText(t,a),n+=20}))}s(X,"drawActorLegend");var G=r().journey,U=G.leftMargin,H=s((function(t,e,n,i){const s=r().journey,a=r().securityLevel;let o;"sandbox"===a&&(o=d("#i"+e));const c=d("sandbox"===a?o.nodes()[0].contentDocument.body:"body");Z.init();const l=c.select("#"+e);Y.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),p=i.db.getActors();for(const r in q)delete q[r];let f=0;p.forEach((t=>{q[t]={color:s.actorColours[f%s.actorColours.length],position:f},f++})),X(l),Z.insert(0,0,U,50*Object.keys(q).length),Q(l,h,0);const g=Z.getBounds();u&&l.append("text").text(u).attr("x",U).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=g.stopy-g.starty+2*s.diagramMarginY,x=U+g.stopx+2*s.diagramMarginX;y(l,m,x,s.useMaxWidth),l.append("line").attr("x1",U).attr("y1",4*s.height).attr("x2",x-U-4).attr("y2",4*s.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=u?70:0;l.attr("viewBox",`${g.startx} -25 ${x} ${m+k}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+k+25)}),"draw"),Z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:s((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:s((function(t,e,n,i){const a=r().journey,o=this;let c=0;function l(r){return s((function(s){c++;const l=o.sequenceItems.length-c+1;o.updateVal(s,"starty",e-l*a.boxMargin,Math.min),o.updateVal(s,"stopy",i+l*a.boxMargin,Math.max),o.updateVal(Z.data,"startx",t-l*a.boxMargin,Math.min),o.updateVal(Z.data,"stopx",n+l*a.boxMargin,Math.max),"activation"!==r&&(o.updateVal(s,"startx",t-l*a.boxMargin,Math.min),o.updateVal(s,"stopx",n+l*a.boxMargin,Math.max),o.updateVal(Z.data,"starty",e-l*a.boxMargin,Math.min),o.updateVal(Z.data,"stopy",i+l*a.boxMargin,Math.max))}),"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())}),"updateBounds"),insert:s((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Z.data,"startx",s,Math.min),this.updateVal(Z.data,"starty",a,Math.min),this.updateVal(Z.data,"stopx",r,Math.max),this.updateVal(Z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:s((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:s((function(){return this.verticalPos}),"getVerticalPos"),getBounds:s((function(){return this.data}),"getBounds")},J=G.sectionFills,K=G.sectionColours,Q=s((function(t,e,n){const i=r().journey;let s="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[r,u]of e.entries()){if(s!==u.section){c=J[o%J.length],h=o%J.length,l=K[o%K.length];let n=0;const a=u.section;for(let t=r;t<e.length&&e[t].section==a;t++)n+=1;const p={x:r*i.taskMargin+r*i.width+U,y:50,text:u.section,fill:c,num:h,colour:l,taskCount:n};Y.drawSection(t,p,i),s=u.section,o++}const n=u.people.reduce(((t,e)=>(q[e]&&(t[e]=q[e]),t)),{});u.x=r*i.taskMargin+r*i.width+U,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=l,u.fill=c,u.num=h,u.actors=n,Y.drawTask(t,u,i),Z.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}}),"drawTasks"),tt={setConf:W,draw:H},et={parser:m,db:P,renderer:tt,styles:j,init:s((t=>{tt.setConf(t.journey),P.clear()}),"init")};export{et as diagram};
@@ -1 +1 @@
1
- import"./graph-BMenLjsK.js";import{i as r}from"./_baseUniq-BRVQVHd9.js";import{c as e}from"./clone-B_Mv0xNl.js";import{m as n}from"./min-C5A3NmZ1.js";function o(n){var o={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:t(n),edges:a(n)};return r(n.graph())||(o.value=e(n.graph())),o}function t(e){return n(e.nodes(),(function(n){var o=e.node(n),t=e.parent(n),a={v:n};return r(o)||(a.value=o),r(t)||(a.parent=t),a}))}function a(e){return n(e.edges(),(function(n){var o=e.edge(n),t={v:n.v,w:n.w};return r(n.name)||(t.name=n.name),r(o)||(t.value=o),t}))}export{o as w};
1
+ import"./graph-Bn_1ovuo.js";import{i as r}from"./_baseUniq-CoqlYLqT.js";import{c as e}from"./clone-CgygiSo_.js";import{m as n}from"./min-DuxL3nvs.js";function o(n){var o={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:t(n),edges:a(n)};return r(n.graph())||(o.value=e(n.graph())),o}function t(e){return n(e.nodes(),(function(n){var o=e.node(n),t=e.parent(n),a={v:n};return r(o)||(a.value=o),r(t)||(a.parent=t),a}))}function a(e){return n(e.edges(),(function(n){var o=e.edge(n),t={v:n.v,w:n.w};return r(n.name)||(t.name=n.name),r(o)||(t.value=o),t}))}export{o as w};