orbitchat 2.2.3 → 2.2.5

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/bin/orbitchat.js +1 -1
  2. package/dist/assets/_basePickBy-BjEly54R-DqvpNhss.js +1 -0
  3. package/dist/assets/_baseUniq-DRc_T5HB-BD-eiKhZ.js +1 -0
  4. package/dist/assets/{api-CUMR6WpG.js → api-B0lJClJq.js} +1 -1
  5. package/dist/assets/arc-CZCQSTaI-COU74SO_.js +1 -0
  6. package/dist/assets/architectureDiagram-VXUJARFQ-Cfm45ePu-DpyHVagy.js +36 -0
  7. package/dist/assets/blockDiagram-VD42YOAC-BRbgLESd-Ck20-ft3.js +122 -0
  8. package/dist/assets/c4Diagram-YG6GDRKO-DLei6MnZ-CyXWsii7.js +10 -0
  9. package/dist/assets/channel-DkFrLL9m-pXEXdU8i.js +1 -0
  10. package/dist/assets/chunk-4BX2VUAB-DeMNg1Xd-CrtFwSE5.js +1 -0
  11. package/dist/assets/chunk-55IACEB6-_r7qMy9s-CVsj1DxS.js +1 -0
  12. package/dist/assets/chunk-B4BG7PRW-CIxgz8SC-at5hJRU9.js +165 -0
  13. package/dist/assets/chunk-DI55MBZ5-i035IDz6-DxOVU1og.js +220 -0
  14. package/dist/assets/chunk-FMBD7UC4-Bm0ev8jq-BTHOwKty.js +15 -0
  15. package/dist/assets/chunk-QN33PNHL-C8-RyAc3-DADdydNm.js +1 -0
  16. package/dist/assets/chunk-QZHKN3VN-DMEEp6GB-MKN7DFjX.js +1 -0
  17. package/dist/assets/chunk-TZMSLE5B-CNFsEzOl-BT3YM95Y.js +1 -0
  18. package/dist/assets/classDiagram-2ON5EDUG-DnsiOvOV-CXFnq-_j.js +1 -0
  19. package/dist/assets/classDiagram-v2-WZHVMYZB-DnsiOvOV-CXFnq-_j.js +1 -0
  20. package/dist/assets/clone-DduvFCk3-BXgbo_Py.js +1 -0
  21. package/dist/assets/cose-bilkent-S5V4N54A-VxeRCpgs-ToXg3tv0.js +1 -0
  22. package/dist/assets/cytoscape.esm-CjI2IsL8-Da6dFVsf.js +331 -0
  23. package/dist/assets/dagre-6UL2VRFP-B-o0qgxK-B7jIOGhI.js +4 -0
  24. package/dist/assets/diagram-PSM6KHXK-CoKmJ9sN-CeSAdKE7.js +24 -0
  25. package/dist/assets/diagram-QEK2KX5R-ETMfkzYL-BXfUD6Bz.js +43 -0
  26. package/dist/assets/diagram-S2PKOQOG-BgLbl6rv-Bq7z4qcN.js +24 -0
  27. package/dist/assets/erDiagram-Q2GNP2WA-Swwdy5pk-CDqK5rW5.js +60 -0
  28. package/dist/assets/flowDiagram-NV44I4VS-DXJdBBSZ-BwK5ukuy.js +162 -0
  29. package/dist/assets/ganttDiagram-LVOFAZNH-DmRbHwxf-DcLr4kCw.js +267 -0
  30. package/dist/assets/gitGraphDiagram-NY62KEGX-D30uHfXn-CQ3udd86.js +65 -0
  31. package/dist/assets/graph-ClfIprSM-Bo9NcOv2.js +1 -0
  32. package/dist/assets/{index-DlFdZiHl-C7HbEZKd.js → index-Bny2bm5_-BTHX9t_s.js} +1 -1
  33. package/dist/assets/index-CIi9dO9d.js +1184 -0
  34. package/dist/assets/infoDiagram-ER5ION4S-C0DTNQfZ-LvJs62gz.js +2 -0
  35. package/dist/assets/journeyDiagram-XKPGCS4Q-53CUbf20-CN2QFlhq.js +139 -0
  36. package/dist/assets/kanban-definition-3W4ZIXB7-B-HAgUf7-CCmqybnp.js +89 -0
  37. package/dist/assets/layout-DoRwGyA9-iPNfcIdd.js +1 -0
  38. package/dist/assets/mindmap-definition-VGOIOE7T-JxieKS1D-C0G1Iimv.js +68 -0
  39. package/dist/assets/pieDiagram-ADFJNKIX-vEsBIPBi-B9KBvrYJ.js +30 -0
  40. package/dist/assets/quadrantDiagram-AYHSOK5B-DuNXQUnS-aaneQodw.js +7 -0
  41. package/dist/assets/requirementDiagram-UZGBJVZJ-Ajt9-U96-DJ47o9fU.js +64 -0
  42. package/dist/assets/sankeyDiagram-TZEHDZUN-BNMEPupP-BUQLAXZ-.js +10 -0
  43. package/dist/assets/sequenceDiagram-WL72ISMW-D2j881gi-DESm0zUV.js +145 -0
  44. package/dist/assets/stateDiagram-FKZM4ZOC-D9G5SS9f-BGFYCrOw.js +1 -0
  45. package/dist/assets/stateDiagram-v2-4FDKWEC3-D0cjqibA-CBYfNThC.js +1 -0
  46. package/dist/assets/timeline-definition-IT6M3QCI-B95452nE-BhqaFUs-.js +61 -0
  47. package/dist/assets/treemap-KMMF4GRG-Dfxm7cSf-B7pg2atG.js +128 -0
  48. package/dist/assets/xychartDiagram-PRI3JC2R-CZX71UOJ-zWpWPPXY.js +7 -0
  49. package/dist/index.html +1 -1
  50. package/package.json +2 -2
  51. package/dist/assets/Tableau10-D7jGxypv-Cyu9clx1.js +0 -1
  52. package/dist/assets/arc-m8RC5oDD-D_zqriJo.js +0 -1
  53. package/dist/assets/blockDiagram-c4efeb88-CZ2mpei3-DNgkbqw8.js +0 -118
  54. package/dist/assets/c4Diagram-c83219d4-DL2EmCLj-CuUh45wR.js +0 -10
  55. package/dist/assets/channel-BKp1WYnX-Bfkn8_bQ.js +0 -1
  56. package/dist/assets/classDiagram-beda092f-vKbJ2bcD-CWrQ3PmP.js +0 -2
  57. package/dist/assets/classDiagram-v2-2358418a-BHXpn1Du-v6U68RJv.js +0 -2
  58. package/dist/assets/clone-B1V2003j-C6XGoCe0.js +0 -1
  59. package/dist/assets/createText-1719965b-C2-AT0ab-CSaYVcyR.js +0 -7
  60. package/dist/assets/edges-96097737-Zk-qG_8u-BvX-rD_e.js +0 -4
  61. package/dist/assets/erDiagram-0228fc6a-B94anMjz-C0RUxFzz.js +0 -51
  62. package/dist/assets/flowDb-c6c81e3f-CRRW-bQO-Dv8ApRnS.js +0 -10
  63. package/dist/assets/flowDiagram-50d868cf-DPzQMhJv-qcXw24Z1.js +0 -4
  64. package/dist/assets/flowDiagram-v2-4f6560a1-Si9enBmB-BosOeZuP.js +0 -1
  65. package/dist/assets/flowchart-elk-definition-6af322e1-CULhtvD--CMyJERSt.js +0 -139
  66. package/dist/assets/ganttDiagram-a2739b55-Bp8yOLEz-0p0LU6B2.js +0 -257
  67. package/dist/assets/gitGraphDiagram-82fe8481-BYtOQJl0-Cdvv8RH9.js +0 -70
  68. package/dist/assets/graph-BV6jB5rk-BPsWqwd1.js +0 -1
  69. package/dist/assets/index-5325376f-DrY72DrM-cyJIharh.js +0 -1
  70. package/dist/assets/index-CBAg0_Do.js +0 -1008
  71. package/dist/assets/infoDiagram-8eee0895-C6GFnrZ7-B58B7U0j.js +0 -7
  72. package/dist/assets/journeyDiagram-c64418c1-daS1W8qe-i2hoPaI4.js +0 -139
  73. package/dist/assets/layout-LXMv3mSS-D7gLeKlL.js +0 -1
  74. package/dist/assets/mindmap-definition-8da855dc-DmNQYVT1-8qfS2G_Q.js +0 -425
  75. package/dist/assets/pieDiagram-a8764435-381urBY5-BL34EuZ1.js +0 -35
  76. package/dist/assets/quadrantDiagram-1e28029f-hgRmK2bX-D0tGtC6c.js +0 -7
  77. package/dist/assets/requirementDiagram-08caed73-BB0Q-cI9-C_nbMj6N.js +0 -52
  78. package/dist/assets/sankeyDiagram-a04cb91d-BpsipZNt-BWArNeVf.js +0 -8
  79. package/dist/assets/sequenceDiagram-c5b8d532-xoAvPcQJ-DAGq-LjC.js +0 -122
  80. package/dist/assets/stateDiagram-1ecb1508-b721R49K-BIX80hin.js +0 -1
  81. package/dist/assets/stateDiagram-v2-c2b004d7-BmSbrbqZ-1xTqgfV7.js +0 -1
  82. package/dist/assets/styles-b4e223ce-TYmJC5IN-Bh92tu5N.js +0 -160
  83. package/dist/assets/styles-ca3715f6-CfJZu0Yn-DDmGuNcW.js +0 -207
  84. package/dist/assets/styles-d45a18b0-DZ8oSYcV-BPX-QgIY.js +0 -116
  85. package/dist/assets/svgDrawCommon-b86b1483-CXPkN8HW-BDGr_arU.js +0 -1
  86. package/dist/assets/timeline-definition-faaaa080-LDFf1jfb-C-sZwXLb.js +0 -61
  87. package/dist/assets/xychartDiagram-f5964ef8-DdhO5-Bp-BJGdviNy.js +0 -7
@@ -1,7 +0,0 @@
1
- import{O as Et,br as At,W as It,ak as Tt,bs as Ct,bt as ze}from"./index-CBAg0_Do.js";const wt={};function zt(e,r){const t=wt,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return et(e,n,u)}function et(e,r,t){if(Dt(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qe(e.children,r,t)}return Array.isArray(e)?qe(e,r,t):""}function qe(e,r,t){const n=[];let u=-1;for(;++u<e.length;)n[u]=et(e[u],r,t);return n.join("")}function Dt(e){return!!(e&&typeof e=="object")}function te(e,r,t,n){const u=e.length;let c=0,i;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,n.length<1e4)i=Array.from(n),i.unshift(r,t),e.splice(...i);else for(t&&e.splice(r,t);c<n.length;)i=n.slice(c,c+1e4),i.unshift(r,0),e.splice(...i),c+=1e4,r+=1e4}function K(e,r){return e.length>0?(te(e,e.length,0,r),e):r}const Ve={}.hasOwnProperty;function _t(e){const r={};let t=-1;for(;++t<e.length;)Bt(r,e[t]);return r}function Bt(e,r){let t;for(t in r){const n=(Ve.call(e,t)?e[t]:void 0)||(e[t]={}),u=r[t];let c;if(u)for(c in u){Ve.call(n,c)||(n[c]=[]);const i=u[c];Mt(n[c],Array.isArray(i)?i:i?[i]:[])}}}function Mt(e,r){let t=-1;const n=[];for(;++t<r.length;)(r[t].add==="after"?e:n).push(r[t]);te(e,0,0,n)}const Pt=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ee=se(/[A-Za-z]/),Z=se(/[\dA-Za-z]/),Lt=se(/[#-'*+\--9=?A-Z^-~]/);function Ae(e){return e!==null&&(e<32||e===127)}const Ie=se(/\d/),Ot=se(/[\dA-Fa-f]/),jt=se(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function T(e){return e===-2||e===-1||e===32}const Ht=se(Pt),Rt=se(/\s/);function se(e){return r;function r(t){return t!==null&&e.test(String.fromCharCode(t))}}function _(e,r,t,n){const u=n?n-1:Number.POSITIVE_INFINITY;let c=0;return i;function i(p){return T(p)?(e.enter(t),o(p)):r(p)}function o(p){return T(p)&&c++<u?(e.consume(p),o):(e.exit(t),r(p))}}const qt={tokenize:Vt};function Vt(e){const r=e.attempt(this.parser.constructs.contentInitial,n,u);let t;return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_(e,r,"linePrefix")}function u(o){return e.enter("paragraph"),c(o)}function c(o){const p=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=p),t=p,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return E(o)?(e.consume(o),e.exit("chunkText"),c):(e.consume(o),i)}}const Nt={tokenize:Ut},Ne={tokenize:Wt};function Ut(e){const r=this,t=[];let n=0,u,c,i;return o;function o(S){if(n<t.length){const B=t[n];return r.containerState=B[1],e.attempt(B[0].continuation,p,a)(S)}return a(S)}function p(S){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&O();const B=r.events.length;let P=B,x;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){x=r.events[P][1].end;break}y(n);let w=B;for(;w<r.events.length;)r.events[w][1].end=Object.assign({},x),w++;return te(r.events,P+1,0,r.events.slice(B)),r.events.length=w,a(S)}return o(S)}function a(S){if(n===t.length){if(!u)return g(S);if(u.currentConstruct&&u.currentConstruct.concrete)return I(S);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Ne,d,h)(S)}function d(S){return u&&O(),y(n),g(S)}function h(S){return r.parser.lazy[r.now().line]=n!==t.length,i=r.now().offset,I(S)}function g(S){return r.containerState={},e.attempt(Ne,f,I)(S)}function f(S){return n++,t.push([r.currentConstruct,r.containerState]),g(S)}function I(S){if(S===null){u&&O(),y(0),e.consume(S);return}return u=u||r.parser.flow(r.now()),e.enter("chunkFlow",{contentType:"flow",previous:c,_tokenizer:u}),C(S)}function C(S){if(S===null){L(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return E(S)?(e.consume(S),L(e.exit("chunkFlow")),n=0,r.interrupt=void 0,o):(e.consume(S),C)}function L(S,B){const P=r.sliceStream(S);if(B&&P.push(null),S.previous=c,c&&(c.next=S),c=S,u.defineSkip(S.start),u.write(P),r.parser.lazy[S.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<i&&(!u.events[x][1].end||u.events[x][1].end.offset>i))return;const w=r.events.length;let R=w,q,V;for(;R--;)if(r.events[R][0]==="exit"&&r.events[R][1].type==="chunkFlow"){if(q){V=r.events[R][1].end;break}q=!0}for(y(n),x=w;x<r.events.length;)r.events[x][1].end=Object.assign({},V),x++;te(r.events,R+1,0,r.events.slice(w)),r.events.length=x}}function y(S){let B=t.length;for(;B-- >S;){const P=t[B];r.containerState=P[1],P[0].exit.call(r,e)}t.length=S}function O(){u.write([null]),c=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Wt(e,r,t){return _(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||Q(e)||Rt(e))return 1;if(Ht(e))return 2}function De(e,r,t){const n=[];let u=-1;for(;++u<e.length;){const c=e[u].resolveAll;c&&!n.includes(c)&&(r=c(r,t),n.push(c))}return r}const Te={name:"attention",tokenize:Qt,resolveAll:$t};function $t(e,r){let t=-1,n,u,c,i,o,p,a,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(n=t;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&r.sliceSerialize(e[n][1]).charCodeAt(0)===r.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[n][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;p=e[n][1].end.offset-e[n][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),g=Object.assign({},e[t][1].start);We(h,-p),We(g,p),i={type:p>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:p>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:g},c={type:p>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[t][1].start)},u={type:p>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[t][1].start=Object.assign({},o.end),a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=K(a,[["enter",e[n][1],r],["exit",e[n][1],r]])),a=K(a,[["enter",u,r],["enter",i,r],["exit",i,r],["enter",c,r]]),a=K(a,De(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),a=K(a,[["exit",c,r],["enter",o,r],["exit",o,r],["exit",u,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,a=K(a,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,te(e,n-1,t-n+3,a),t=n+a.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Qt(e,r){const t=this.parser.constructs.attentionMarkers.null,n=this.previous,u=Ue(n);let c;return i;function i(p){return c=p,e.enter("attentionSequence"),o(p)}function o(p){if(p===c)return e.consume(p),o;const a=e.exit("attentionSequence"),d=Ue(p),h=!d||d===2&&u||t.includes(p),g=!u||u===2&&d||t.includes(n);return a._open=!!(c===42?h:h&&(u||!g)),a._close=!!(c===42?g:g&&(d||!h)),r(p)}}function We(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const Kt={name:"autolink",tokenize:Gt};function Gt(e,r,t){let n=0;return u;function u(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(f){return ee(f)?(e.consume(f),i):a(f)}function i(f){return f===43||f===45||f===46||Z(f)?(n=1,o(f)):a(f)}function o(f){return f===58?(e.consume(f),n=0,p):(f===43||f===45||f===46||Z(f))&&n++<32?(e.consume(f),o):(n=0,a(f))}function p(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):f===null||f===32||f===60||Ae(f)?t(f):(e.consume(f),p)}function a(f){return f===64?(e.consume(f),d):Lt(f)?(e.consume(f),a):t(f)}function d(f){return Z(f)?h(f):t(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):g(f)}function g(f){if((f===45||Z(f))&&n++<63){const I=f===45?g:h;return e.consume(f),I}return t(f)}}const Fe={tokenize:Jt,partial:!0};function Jt(e,r,t){return n;function n(c){return T(c)?_(e,u,"linePrefix")(c):u(c)}function u(c){return c===null||E(c)?r(c):t(c)}}const tt={name:"blockQuote",tokenize:Xt,continuation:{tokenize:Zt},exit:Yt};function Xt(e,r,t){const n=this;return u;function u(i){if(i===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),c}return t(i)}function c(i){return T(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(i))}}function Zt(e,r,t){const n=this;return u;function u(i){return T(i)?_(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):c(i)}function c(i){return e.attempt(tt,r,t)(i)}}function Yt(e){e.exit("blockQuote")}const nt={name:"characterEscape",tokenize:en};function en(e,r,t){return n;function n(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),u}function u(c){return jt(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):t(c)}}const rt={name:"characterReference",tokenize:tn};function tn(e,r,t){const n=this;let u=0,c,i;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),p}function p(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),c=31,i=Z,d(h))}function a(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,i=Ot,d):(e.enter("characterReferenceValue"),c=7,i=Ie,d(h))}function d(h){if(h===59&&u){const g=e.exit("characterReferenceValue");return i===Z&&!ze(n.sliceSerialize(g))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return i(h)&&u++<c?(e.consume(h),d):t(h)}}const $e={tokenize:rn,partial:!0},Qe={name:"codeFenced",tokenize:nn,concrete:!0};function nn(e,r,t){const n=this,u={tokenize:P,partial:!0};let c=0,i=0,o;return p;function p(x){return a(x)}function a(x){const w=n.events[n.events.length-1];return c=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===o?(i++,e.consume(x),d):i<3?t(x):(e.exit("codeFencedFenceSequence"),T(x)?_(e,h,"whitespace")(x):h(x))}function h(x){return x===null||E(x)?(e.exit("codeFencedFence"),n.interrupt?r(x):e.check($e,C,B)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(x)):T(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(e,f,"whitespace")(x)):x===96&&x===o?t(x):(e.consume(x),g)}function f(x){return x===null||E(x)?h(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),I(x))}function I(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(x)):x===96&&x===o?t(x):(e.consume(x),I)}function C(x){return e.attempt(u,B,L)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y}function y(x){return c>0&&T(x)?_(e,O,"linePrefix",c+1)(x):O(x)}function O(x){return x===null||E(x)?e.check($e,C,B)(x):(e.enter("codeFlowValue"),S(x))}function S(x){return x===null||E(x)?(e.exit("codeFlowValue"),O(x)):(e.consume(x),S)}function B(x){return e.exit("codeFenced"),r(x)}function P(x,w,R){let q=0;return V;function V(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),F}function F(A){return x.enter("codeFencedFence"),T(A)?_(x,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A)}function v(A){return A===o?(x.enter("codeFencedFenceSequence"),M(A)):R(A)}function M(A){return A===o?(q++,x.consume(A),M):q>=i?(x.exit("codeFencedFenceSequence"),T(A)?_(x,j,"whitespace")(A):j(A)):R(A)}function j(A){return A===null||E(A)?(x.exit("codeFencedFence"),w(A)):R(A)}}}function rn(e,r,t){const n=this;return u;function u(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}const be={name:"codeIndented",tokenize:cn},un={tokenize:on,partial:!0};function cn(e,r,t){const n=this;return u;function u(a){return e.enter("codeIndented"),_(e,c,"linePrefix",5)(a)}function c(a){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(a):t(a)}function i(a){return a===null?p(a):E(a)?e.attempt(un,i,p)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||E(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function p(a){return e.exit("codeIndented"),r(a)}}function on(e,r,t){const n=this;return u;function u(i){return n.parser.lazy[n.now().line]?t(i):E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):_(e,c,"linePrefix",5)(i)}function c(i){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):E(i)?u(i):t(i)}}const sn={name:"codeText",tokenize:fn,resolve:ln,previous:an};function ln(e){let r=e.length-4,t=3,n,u;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n<r;)if(e[n][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(n=t-1,r++;++n<=r;)u===void 0?n!==r&&e[n][1].type!=="lineEnding"&&(u=n):(n===r||e[n][1].type==="lineEnding")&&(e[u][1].type="codeTextData",n!==u+2&&(e[u][1].end=e[n-1][1].end,e.splice(u+2,n-u-2),r-=n-u-2,n=u+2),u=void 0);return e}function an(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fn(e,r,t){let n=0,u,c;return i;function i(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),n++,o):(e.exit("codeTextSequence"),p(h))}function p(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),p):h===96?(c=e.enter("codeTextSequence"),u=0,d(h)):E(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),p):(e.enter("codeTextData"),a(h))}function a(h){return h===null||h===32||h===96||E(h)?(e.exit("codeTextData"),p(h)):(e.consume(h),a)}function d(h){return h===96?(e.consume(h),u++,d):u===n?(e.exit("codeTextSequence"),e.exit("codeText"),r(h)):(c.type="codeTextData",a(h))}}function it(e){const r={};let t=-1,n,u,c,i,o,p,a;for(;++t<e.length;){for(;t in r;)t=r[t];if(n=e[t],t&&n[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(p=n[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,dn(e,t)),t=r[t],a=!0);else if(n[1]._container){for(c=t,u=void 0;c--&&(i=e[c],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(u&&(e[u][1].type="lineEndingBlank"),i[1].type="lineEnding",u=c);u&&(n[1].end=Object.assign({},e[u][1].start),o=e.slice(u,t),o.unshift(n),te(e,u,t-u+1,o))}}return!a}function dn(e,r){const t=e[r][1],n=e[r][2];let u=r-1;const c=[],i=t._tokenizer||n.parser[t.contentType](t.start),o=i.events,p=[],a={};let d,h,g=-1,f=t,I=0,C=0;const L=[C];for(;f;){for(;e[++u][1]!==f;);c.push(u),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=t;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(C=g+1,L.push(C),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):L.pop(),g=L.length;g--;){const y=o.slice(L[g],L[g+1]),O=c.pop();p.unshift([O,O+y.length-1]),te(e,O,2,y)}for(g=-1;++g<p.length;)a[I+p[g][0]]=I+p[g][1],I+=p[g][1]-p[g][0]-1;return a}const pn={tokenize:gn,resolve:mn},hn={tokenize:xn,partial:!0};function mn(e){return it(e),e}function gn(e,r){let t;return n;function n(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?c(o):E(o)?e.check(hn,i,c)(o):(e.consume(o),u)}function c(o){return e.exit("chunkContent"),e.exit("content"),r(o)}function i(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function xn(e,r,t){const n=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_(e,c,"linePrefix")}function c(i){if(i===null||E(i))return t(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):e.interrupt(n.parser.constructs.flow,t,r)(i)}}function ut(e,r,t,n,u,c,i,o,p){const a=p||Number.POSITIVE_INFINITY;let d=0;return h;function h(y){return y===60?(e.enter(n),e.enter(u),e.enter(c),e.consume(y),e.exit(c),g):y===null||y===32||y===41||Ae(y)?t(y):(e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),C(y))}function g(y){return y===62?(e.enter(c),e.consume(y),e.exit(c),e.exit(u),e.exit(n),r):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),g(y)):y===null||y===60||E(y)?t(y):(e.consume(y),y===92?I:f)}function I(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function C(y){return!d&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),r(y)):d<a&&y===40?(e.consume(y),d++,C):y===41?(e.consume(y),d--,C):y===null||y===32||y===40||Ae(y)?t(y):(e.consume(y),y===92?L:C)}function L(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function ct(e,r,t,n,u,c){const i=this;let o=0,p;return a;function a(f){return e.enter(n),e.enter(u),e.consume(f),e.exit(u),e.enter(c),d}function d(f){return o>999||f===null||f===91||f===93&&!p||f===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?t(f):f===93?(e.exit(c),e.enter(u),e.consume(f),e.exit(u),e.exit(n),r):E(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||E(f)||o++>999?(e.exit("chunkString"),d(f)):(e.consume(f),p||(p=!T(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function ot(e,r,t,n,u,c){let i;return o;function o(g){return g===34||g===39||g===40?(e.enter(n),e.enter(u),e.consume(g),e.exit(u),i=g===40?41:g,p):t(g)}function p(g){return g===i?(e.enter(u),e.consume(g),e.exit(u),e.exit(n),r):(e.enter(c),a(g))}function a(g){return g===i?(e.exit(c),p(i)):g===null?t(g):E(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===i||g===null||E(g)?(e.exit("chunkString"),a(g)):(e.consume(g),g===92?h:d)}function h(g){return g===i||g===92?(e.consume(g),d):d(g)}}function xe(e,r){let t;return n;function n(u){return E(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t=!0,n):T(u)?_(e,n,t?"linePrefix":"lineSuffix")(u):r(u)}}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn={name:"definition",tokenize:Fn},yn={tokenize:vn,partial:!0};function Fn(e,r,t){const n=this;let u;return c;function c(f){return e.enter("definition"),i(f)}function i(f){return ct.call(n,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return u=he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),p):t(f)}function p(f){return Q(f)?xe(e,a)(f):a(f)}function a(f){return ut(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(yn,h,h)(f)}function h(f){return T(f)?_(e,g,"whitespace")(f):g(f)}function g(f){return f===null||E(f)?(e.exit("definition"),n.parser.defined.push(u),r(f)):t(f)}}function vn(e,r,t){return n;function n(o){return Q(o)?xe(e,u)(o):t(o)}function u(o){return ot(e,c,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function c(o){return T(o)?_(e,i,"whitespace")(o):i(o)}function i(o){return o===null||E(o)?r(o):t(o)}}const Sn={name:"hardBreakEscape",tokenize:bn};function bn(e,r,t){return n;function n(c){return e.enter("hardBreakEscape"),e.consume(c),u}function u(c){return E(c)?(e.exit("hardBreakEscape"),r(c)):t(c)}}const En={name:"headingAtx",tokenize:In,resolve:An};function An(e,r){let t=e.length-2,n=3,u,c;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(u={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},c={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},te(e,n,t-n+1,[["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r]])),e}function In(e,r,t){let n=0;return u;function u(d){return e.enter("atxHeading"),c(d)}function c(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&n++<6?(e.consume(d),i):d===null||Q(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),p(d)):d===null||E(d)?(e.exit("atxHeading"),r(d)):T(d)?_(e,o,"whitespace")(d):(e.enter("atxHeadingText"),a(d))}function p(d){return d===35?(e.consume(d),p):(e.exit("atxHeadingSequence"),o(d))}function a(d){return d===null||d===35||Q(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),a)}}const Tn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ke=["pre","script","style","textarea"],Cn={name:"htmlFlow",tokenize:_n,resolveTo:Dn,concrete:!0},wn={tokenize:Mn,partial:!0},zn={tokenize:Bn,partial:!0};function Dn(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function _n(e,r,t){const n=this;let u,c,i,o,p;return a;function a(l){return d(l)}function d(l){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(l),h}function h(l){return l===33?(e.consume(l),g):l===47?(e.consume(l),c=!0,C):l===63?(e.consume(l),u=3,n.interrupt?r:s):ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function g(l){return l===45?(e.consume(l),u=2,f):l===91?(e.consume(l),u=5,o=0,I):ee(l)?(e.consume(l),u=4,n.interrupt?r:s):t(l)}function f(l){return l===45?(e.consume(l),n.interrupt?r:s):t(l)}function I(l){const X="CDATA[";return l===X.charCodeAt(o++)?(e.consume(l),o===X.length?n.interrupt?r:v:I):t(l)}function C(l){return ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function L(l){if(l===null||l===47||l===62||Q(l)){const X=l===47,ae=i.toLowerCase();return!X&&!c&&Ke.includes(ae)?(u=1,n.interrupt?r(l):v(l)):Tn.includes(i.toLowerCase())?(u=6,X?(e.consume(l),y):n.interrupt?r(l):v(l)):(u=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(l):c?O(l):S(l))}return l===45||Z(l)?(e.consume(l),i+=String.fromCharCode(l),L):t(l)}function y(l){return l===62?(e.consume(l),n.interrupt?r:v):t(l)}function O(l){return T(l)?(e.consume(l),O):V(l)}function S(l){return l===47?(e.consume(l),V):l===58||l===95||ee(l)?(e.consume(l),B):T(l)?(e.consume(l),S):V(l)}function B(l){return l===45||l===46||l===58||l===95||Z(l)?(e.consume(l),B):P(l)}function P(l){return l===61?(e.consume(l),x):T(l)?(e.consume(l),P):S(l)}function x(l){return l===null||l===60||l===61||l===62||l===96?t(l):l===34||l===39?(e.consume(l),p=l,w):T(l)?(e.consume(l),x):R(l)}function w(l){return l===p?(e.consume(l),p=null,q):l===null||E(l)?t(l):(e.consume(l),w)}function R(l){return l===null||l===34||l===39||l===47||l===60||l===61||l===62||l===96||Q(l)?P(l):(e.consume(l),R)}function q(l){return l===47||l===62||T(l)?S(l):t(l)}function V(l){return l===62?(e.consume(l),F):t(l)}function F(l){return l===null||E(l)?v(l):T(l)?(e.consume(l),F):t(l)}function v(l){return l===45&&u===2?(e.consume(l),W):l===60&&u===1?(e.consume(l),N):l===62&&u===4?(e.consume(l),J):l===63&&u===3?(e.consume(l),s):l===93&&u===5?(e.consume(l),ne):E(l)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(wn,re,M)(l)):l===null||E(l)?(e.exit("htmlFlowData"),M(l)):(e.consume(l),v)}function M(l){return e.check(zn,j,re)(l)}function j(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),A}function A(l){return l===null||E(l)?M(l):(e.enter("htmlFlowData"),v(l))}function W(l){return l===45?(e.consume(l),s):v(l)}function N(l){return l===47?(e.consume(l),i="",G):v(l)}function G(l){if(l===62){const X=i.toLowerCase();return Ke.includes(X)?(e.consume(l),J):v(l)}return ee(l)&&i.length<8?(e.consume(l),i+=String.fromCharCode(l),G):v(l)}function ne(l){return l===93?(e.consume(l),s):v(l)}function s(l){return l===62?(e.consume(l),J):l===45&&u===2?(e.consume(l),s):v(l)}function J(l){return l===null||E(l)?(e.exit("htmlFlowData"),re(l)):(e.consume(l),J)}function re(l){return e.exit("htmlFlow"),r(l)}}function Bn(e,r,t){const n=this;return u;function u(i){return E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c):t(i)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}function Mn(e,r,t){return n;function n(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(Fe,r,t)}}const Pn={name:"htmlText",tokenize:Ln};function Ln(e,r,t){const n=this;let u,c,i;return o;function o(s){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(s),p}function p(s){return s===33?(e.consume(s),a):s===47?(e.consume(s),P):s===63?(e.consume(s),S):ee(s)?(e.consume(s),R):t(s)}function a(s){return s===45?(e.consume(s),d):s===91?(e.consume(s),c=0,I):ee(s)?(e.consume(s),O):t(s)}function d(s){return s===45?(e.consume(s),f):t(s)}function h(s){return s===null?t(s):s===45?(e.consume(s),g):E(s)?(i=h,N(s)):(e.consume(s),h)}function g(s){return s===45?(e.consume(s),f):h(s)}function f(s){return s===62?W(s):s===45?g(s):h(s)}function I(s){const J="CDATA[";return s===J.charCodeAt(c++)?(e.consume(s),c===J.length?C:I):t(s)}function C(s){return s===null?t(s):s===93?(e.consume(s),L):E(s)?(i=C,N(s)):(e.consume(s),C)}function L(s){return s===93?(e.consume(s),y):C(s)}function y(s){return s===62?W(s):s===93?(e.consume(s),y):C(s)}function O(s){return s===null||s===62?W(s):E(s)?(i=O,N(s)):(e.consume(s),O)}function S(s){return s===null?t(s):s===63?(e.consume(s),B):E(s)?(i=S,N(s)):(e.consume(s),S)}function B(s){return s===62?W(s):S(s)}function P(s){return ee(s)?(e.consume(s),x):t(s)}function x(s){return s===45||Z(s)?(e.consume(s),x):w(s)}function w(s){return E(s)?(i=w,N(s)):T(s)?(e.consume(s),w):W(s)}function R(s){return s===45||Z(s)?(e.consume(s),R):s===47||s===62||Q(s)?q(s):t(s)}function q(s){return s===47?(e.consume(s),W):s===58||s===95||ee(s)?(e.consume(s),V):E(s)?(i=q,N(s)):T(s)?(e.consume(s),q):W(s)}function V(s){return s===45||s===46||s===58||s===95||Z(s)?(e.consume(s),V):F(s)}function F(s){return s===61?(e.consume(s),v):E(s)?(i=F,N(s)):T(s)?(e.consume(s),F):q(s)}function v(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(e.consume(s),u=s,M):E(s)?(i=v,N(s)):T(s)?(e.consume(s),v):(e.consume(s),j)}function M(s){return s===u?(e.consume(s),u=void 0,A):s===null?t(s):E(s)?(i=M,N(s)):(e.consume(s),M)}function j(s){return s===null||s===34||s===39||s===60||s===61||s===96?t(s):s===47||s===62||Q(s)?q(s):(e.consume(s),j)}function A(s){return s===47||s===62||Q(s)?q(s):t(s)}function W(s){return s===62?(e.consume(s),e.exit("htmlTextData"),e.exit("htmlText"),r):t(s)}function N(s){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),G}function G(s){return T(s)?_(e,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):ne(s)}function ne(s){return e.enter("htmlTextData"),i(s)}}const _e={name:"labelEnd",tokenize:Vn,resolveTo:qn,resolveAll:Rn},On={tokenize:Nn},jn={tokenize:Un},Hn={tokenize:Wn};function Rn(e){let r=-1;for(;++r<e.length;){const t=e[r][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++)}return e}function qn(e,r){let t=e.length,n=0,u,c,i,o;for(;t--;)if(u=e[t][1],c){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(c=t,u.type!=="labelLink")){n=2;break}}else u.type==="labelEnd"&&(i=t);const p={type:e[c][1].type==="labelLink"?"link":"image",start:Object.assign({},e[c][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"label",start:Object.assign({},e[c][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[c+n+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",p,r],["enter",a,r]],o=K(o,e.slice(c+1,c+n+3)),o=K(o,[["enter",d,r]]),o=K(o,De(r.parser.constructs.insideSpan.null,e.slice(c+n+4,i-3),r)),o=K(o,[["exit",d,r],e[i-2],e[i-1],["exit",a,r]]),o=K(o,e.slice(i+1)),o=K(o,[["exit",p,r]]),te(e,c,e.length,o),e}function Vn(e,r,t){const n=this;let u=n.events.length,c,i;for(;u--;)if((n.events[u][1].type==="labelImage"||n.events[u][1].type==="labelLink")&&!n.events[u][1]._balanced){c=n.events[u][1];break}return o;function o(g){return c?c._inactive?h(g):(i=n.parser.defined.includes(he(n.sliceSerialize({start:c.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):t(g)}function p(g){return g===40?e.attempt(On,d,i?d:h)(g):g===91?e.attempt(jn,d,i?a:h)(g):i?d(g):h(g)}function a(g){return e.attempt(Hn,d,h)(g)}function d(g){return r(g)}function h(g){return c._balanced=!0,t(g)}}function Nn(e,r,t){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),u}function u(h){return Q(h)?xe(e,c)(h):c(h)}function c(h){return h===41?d(h):ut(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function i(h){return Q(h)?xe(e,p)(h):d(h)}function o(h){return t(h)}function p(h){return h===34||h===39||h===40?ot(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function a(h){return Q(h)?xe(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),r):t(h)}}function Un(e,r,t){const n=this;return u;function u(o){return ct.call(n,e,c,i,"reference","referenceMarker","referenceString")(o)}function c(o){return n.parser.defined.includes(he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(o):t(o)}function i(o){return t(o)}}function Wn(e,r,t){return n;function n(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),u}function u(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),r):t(c)}}const $n={name:"labelStartImage",tokenize:Qn,resolveAll:_e.resolveAll};function Qn(e,r,t){const n=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),c}function c(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):t(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(o):r(o)}}const Kn={name:"labelStartLink",tokenize:Gn,resolveAll:_e.resolveAll};function Gn(e,r,t){const n=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),c}function c(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(i):r(i)}}const Ee={name:"lineEnding",tokenize:Jn};function Jn(e,r){return t;function t(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),_(e,r,"linePrefix")}}const ke={name:"thematicBreak",tokenize:Xn};function Xn(e,r,t){let n=0,u;return c;function c(a){return e.enter("thematicBreak"),i(a)}function i(a){return u=a,o(a)}function o(a){return a===u?(e.enter("thematicBreakSequence"),p(a)):n>=3&&(a===null||E(a))?(e.exit("thematicBreak"),r(a)):t(a)}function p(a){return a===u?(e.consume(a),n++,p):(e.exit("thematicBreakSequence"),T(a)?_(e,o,"whitespace")(a):o(a))}}const $={name:"list",tokenize:er,continuation:{tokenize:tr},exit:rr},Zn={tokenize:ir,partial:!0},Yn={tokenize:nr,partial:!0};function er(e,r,t){const n=this,u=n.events[n.events.length-1];let c=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(f){const I=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(I==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ie(f)){if(n.containerState.type||(n.containerState.type=I,e.enter(I,{_container:!0})),I==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ke,t,a)(f):a(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(f)}return t(f)}function p(f){return Ie(f)&&++i<10?(e.consume(f),p):(!n.interrupt||i<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),a(f)):t(f)}function a(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Fe,n.interrupt?t:d,e.attempt(Zn,g,h))}function d(f){return n.containerState.initialBlankLine=!0,c++,g(f)}function h(f){return T(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=c+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(f)}}function tr(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(Fe,u,c);function u(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,_(e,r,"listItemIndent",n.containerState.size+1)(o)}function c(o){return n.containerState.furtherBlankLines||!T(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Yn,r,i)(o))}function i(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,_(e,e.attempt($,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nr(e,r,t){const n=this;return _(e,u,"listItemIndent",n.containerState.size+1);function u(c){const i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?r(c):t(c)}}function rr(e){e.exit(this.containerState.type)}function ir(e,r,t){const n=this;return _(e,u,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(c){const i=n.events[n.events.length-1];return!T(c)&&i&&i[1].type==="listItemPrefixWhitespace"?r(c):t(c)}}const Ge={name:"setextUnderline",tokenize:cr,resolveTo:ur};function ur(e,r){let t=e.length,n,u,c;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(u=t)}else e[t][1].type==="content"&&e.splice(t,1),!c&&e[t][1].type==="definition"&&(c=t);const i={type:"setextHeading",start:Object.assign({},e[u][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[u][1].type="setextHeadingText",c?(e.splice(u,0,["enter",i,r]),e.splice(c+1,0,["exit",e[n][1],r]),e[n][1].end=Object.assign({},e[c][1].end)):e[n][1]=i,e.push(["exit",i,r]),e}function cr(e,r,t){const n=this;let u;return c;function c(a){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),u=a,i(a)):t(a)}function i(a){return e.enter("setextHeadingLineSequence"),o(a)}function o(a){return a===u?(e.consume(a),o):(e.exit("setextHeadingLineSequence"),T(a)?_(e,p,"lineSuffix")(a):p(a))}function p(a){return a===null||E(a)?(e.exit("setextHeadingLine"),r(a)):t(a)}}const or={tokenize:sr};function sr(e){const r=this,t=e.attempt(Fe,n,e.attempt(this.parser.constructs.flowInitial,u,_(e,e.attempt(this.parser.constructs.flow,u,e.attempt(pn,u)),"linePrefix")));return t;function n(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const lr={resolveAll:lt()},ar=st("string"),fr=st("text");function st(e){return{tokenize:r,resolveAll:lt(e==="text"?dr:void 0)};function r(t){const n=this,u=this.parser.constructs[e],c=t.attempt(u,i,o);return i;function i(d){return a(d)?c(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),p}function p(d){return a(d)?(t.exit("data"),c(d)):(t.consume(d),p)}function a(d){if(d===null)return!0;const h=u[d];let g=-1;if(h)for(;++g<h.length;){const f=h[g];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function lt(e){return r;function r(t,n){let u=-1,c;for(;++u<=t.length;)c===void 0?t[u]&&t[u][1].type==="data"&&(c=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==c+2&&(t[c][1].end=t[u-1][1].end,t.splice(c+2,u-c-2),u=c+2),c=void 0);return e?e(t,n):t}}function dr(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],u=r.sliceStream(n);let c=u.length,i=-1,o=0,p;for(;c--;){const a=u[c];if(typeof a=="string"){for(i=a.length;a.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(a===-2)p=!0,o++;else if(a!==-1){c++;break}}if(o){const a={type:t===e.length||p||o<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-o,offset:n.end.offset-o,_index:n.start._index+c,_bufferIndex:c?i:n.start._bufferIndex+i},end:Object.assign({},n.end)};n.end=Object.assign({},a.start),n.start.offset===n.end.offset?Object.assign(n,a):(e.splice(t,0,["enter",a,r],["exit",a,r]),t+=2)}t++}return e}function pr(e,r,t){let n=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const u={},c=[];let i=[],o=[];const p={consume:O,enter:S,exit:B,attempt:w(P),check:w(x),interrupt:w(x,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:g,now:I,defineSkip:C,write:h};let d=r.tokenize.call(a,p);return r.resolveAll&&c.push(r),a;function h(F){return i=K(i,F),L(),i[i.length-1]!==null?[]:(R(r,0),a.events=De(c,a.events,a),a.events)}function g(F,v){return mr(f(F),v)}function f(F){return hr(i,F)}function I(){const{line:F,column:v,offset:M,_index:j,_bufferIndex:A}=n;return{line:F,column:v,offset:M,_index:j,_bufferIndex:A}}function C(F){u[F.line]=F.column,V()}function L(){let F;for(;n._index<i.length;){const v=i[n._index];if(typeof v=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<v.length;)y(v.charCodeAt(n._bufferIndex));else y(v)}}function y(F){d=d(F)}function O(F){E(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,V()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===i[n._index].length&&(n._bufferIndex=-1,n._index++)),a.previous=F}function S(F,v){const M=v||{};return M.type=F,M.start=I(),a.events.push(["enter",M,a]),o.push(M),M}function B(F){const v=o.pop();return v.end=I(),a.events.push(["exit",v,a]),v}function P(F,v){R(F,v.from)}function x(F,v){v.restore()}function w(F,v){return M;function M(j,A,W){let N,G,ne,s;return Array.isArray(j)?re(j):"tokenize"in j?re([j]):J(j);function J(U){return fe;function fe(ce){const de=ce!==null&&U[ce],pe=ce!==null&&U.null,ve=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return re(ve)(ce)}}function re(U){return N=U,G=0,U.length===0?W:l(U[G])}function l(U){return fe;function fe(ce){return s=q(),ne=U,U.partial||(a.currentConstruct=U),U.name&&a.parser.constructs.disable.null.includes(U.name)?ae():U.tokenize.call(v?Object.assign(Object.create(a),v):a,p,X,ae)(ce)}}function X(U){return F(ne,s),A}function ae(U){return s.restore(),++G<N.length?l(N[G]):W}}}function R(F,v){F.resolveAll&&!c.includes(F)&&c.push(F),F.resolve&&te(a.events,v,a.events.length-v,F.resolve(a.events.slice(v),a)),F.resolveTo&&(a.events=F.resolveTo(a.events,a))}function q(){const F=I(),v=a.previous,M=a.currentConstruct,j=a.events.length,A=Array.from(o);return{restore:W,from:j};function W(){n=F,a.previous=v,a.currentConstruct=M,a.events.length=j,o=A,V()}}function V(){n.line in u&&n.column<2&&(n.column=u[n.line],n.offset+=u[n.line]-1)}}function hr(e,r){const t=r.start._index,n=r.start._bufferIndex,u=r.end._index,c=r.end._bufferIndex;let i;if(t===u)i=[e[t].slice(n,c)];else{if(i=e.slice(t,u),n>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(n):i.shift()}c>0&&i.push(e[u].slice(0,c))}return i}function mr(e,r){let t=-1;const n=[];let u;for(;++t<e.length;){const c=e[t];let i;if(typeof c=="string")i=c;else switch(c){case-5:{i="\r";break}case-4:{i=`
2
- `;break}case-3:{i=`\r
3
- `;break}case-2:{i=r?" ":" ";break}case-1:{if(!r&&u)continue;i=" ";break}default:i=String.fromCharCode(c)}u=c===-2,n.push(i)}return n.join("")}const gr={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:tt},xr={91:kn},kr={[-2]:be,[-1]:be,32:be},yr={35:En,42:ke,45:[Ge,ke],60:Cn,61:Ge,95:ke,96:Qe,126:Qe},Fr={38:rt,92:nt},vr={[-5]:Ee,[-4]:Ee,[-3]:Ee,33:$n,38:rt,42:Te,60:[Kt,Pn],91:Kn,92:[Sn,nt],93:_e,95:Te,96:sn},Sr={null:[Te,lr]},br={null:[42,95]},Er={null:[]},Ar=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:br,contentInitial:xr,disable:Er,document:gr,flow:yr,flowInitial:kr,insideSpan:Sr,string:Fr,text:vr},Symbol.toStringTag,{value:"Module"}));function Ir(e){const r=_t([Ar,...(e||{}).extensions||[]]),t={defined:[],lazy:{},constructs:r,content:n(qt),document:n(Nt),flow:n(or),string:n(ar),text:n(fr)};return t;function n(u){return c;function c(i){return pr(t,u,i)}}}const Je=/[\0\t\n\r]/g;function Tr(){let e=1,r="",t=!0,n;return u;function u(c,i,o){const p=[];let a,d,h,g,f;for(c=r+c.toString(i),h=0,r="",t&&(c.charCodeAt(0)===65279&&h++,t=void 0);h<c.length;){if(Je.lastIndex=h,a=Je.exec(c),g=a&&a.index!==void 0?a.index:c.length,f=c.charCodeAt(g),!a){r=c.slice(h);break}if(f===10&&h===g&&n)p.push(-3),n=void 0;else switch(n&&(p.push(-5),n=void 0),h<g&&(p.push(c.slice(h,g)),e+=g-h),f){case 0:{p.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,p.push(-2);e++<d;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:n=!0,e=1}h=g+1}return o&&(n&&p.push(-5),r&&p.push(r),p.push(null)),p}}function Cr(e){for(;!it(e););return e}function at(e,r){const t=Number.parseInt(e,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const wr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zr(e){return e.replace(wr,Dr)}function Dr(e,r,t){if(r)return r;if(t.charCodeAt(0)===35){const n=t.charCodeAt(1),u=n===120||n===88;return at(t.slice(u?2:1),u?16:10)}return ze(t)||e}function ye(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xe(e.position):"start"in e||"end"in e?Xe(e):"line"in e||"column"in e?Ce(e):""}function Ce(e){return Ze(e&&e.line)+":"+Ze(e&&e.column)}function Xe(e){return Ce(e&&e.start)+"-"+Ce(e&&e.end)}function Ze(e){return e&&typeof e=="number"?e:1}const ft={}.hasOwnProperty,dt=function(e,r,t){return typeof r!="string"&&(t=r,r=void 0),_r(t)(Cr(Ir(t).document().write(Tr()(e,r,!0))))};function _r(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(He),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Le),blockQuote:o(ve),characterEscape:F,characterReference:F,codeFenced:o(Pe),codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:o(Pe,p),codeText:o(mt,p),codeTextData:F,data:F,codeFlowValue:F,definition:o(gt),definitionDestinationString:p,definitionLabelString:p,definitionTitleString:p,emphasis:o(xt),hardBreakEscape:o(Oe),hardBreakTrailing:o(Oe),htmlFlow:o(je,p),htmlFlowData:F,htmlText:o(je,p),htmlTextData:F,image:o(kt),label:p,link:o(He),listItem:o(yt),listItemValue:I,listOrdered:o(Re,f),listUnordered:o(Re),paragraph:o(Ft),reference:ae,referenceString:p,resourceDestinationString:p,resourceTitleString:p,setextHeading:o(Le),strong:o(vt),thematicBreak:o(bt)},exit:{atxHeading:d(),atxHeadingSequence:w,autolink:d(),autolinkEmail:pe,autolinkProtocol:de,blockQuote:d(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ce,codeFenced:d(O),codeFencedFence:y,codeFencedFenceInfo:C,codeFencedFenceMeta:L,codeFlowValue:v,codeIndented:d(S),codeText:d(N),codeTextData:v,data:v,definition:d(),definitionDestinationString:x,definitionLabelString:B,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(j),hardBreakTrailing:d(j),htmlFlow:d(A),htmlFlowData:v,htmlText:d(W),htmlTextData:v,image:d(ne),label:J,labelText:s,lineEnding:M,link:d(G),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:U,resourceDestinationString:re,resourceTitleString:l,resource:X,setextHeading:d(V),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};pt(r,(e||{}).mdastExtensions||[]);const t={};return n;function n(m){let k={type:"root",children:[]};const b={stack:[k],tokenStack:[],config:r,enter:a,exit:h,buffer:p,resume:g,setData:c,getData:i},z=[];let D=-1;for(;++D<m.length;)if(m[D][1].type==="listOrdered"||m[D][1].type==="listUnordered")if(m[D][0]==="enter")z.push(D);else{const Y=z.pop();D=u(m,Y,D)}for(D=-1;++D<m.length;){const Y=r[m[D][0]];ft.call(Y,m[D][1].type)&&Y[m[D][1].type].call(Object.assign({sliceSerialize:m[D][2].sliceSerialize},b),m[D][1])}if(b.tokenStack.length>0){const Y=b.tokenStack[b.tokenStack.length-1];(Y[1]||Ye).call(b,void 0,Y[0])}for(k.position={start:oe(m.length>0?m[0][1].start:{line:1,column:1,offset:0}),end:oe(m.length>0?m[m.length-2][1].end:{line:1,column:1,offset:0})},D=-1;++D<r.transforms.length;)k=r.transforms[D](k)||k;return k}function u(m,k,b){let z=k-1,D=-1,Y=!1,le,ie,me,ge;for(;++z<=b;){const H=m[z];if(H[1].type==="listUnordered"||H[1].type==="listOrdered"||H[1].type==="blockQuote"?(H[0]==="enter"?D++:D--,ge=void 0):H[1].type==="lineEndingBlank"?H[0]==="enter"&&(le&&!ge&&!D&&!me&&(me=z),ge=void 0):H[1].type==="linePrefix"||H[1].type==="listItemValue"||H[1].type==="listItemMarker"||H[1].type==="listItemPrefix"||H[1].type==="listItemPrefixWhitespace"||(ge=void 0),!D&&H[0]==="enter"&&H[1].type==="listItemPrefix"||D===-1&&H[0]==="exit"&&(H[1].type==="listUnordered"||H[1].type==="listOrdered")){if(le){let Se=z;for(ie=void 0;Se--;){const ue=m[Se];if(ue[1].type==="lineEnding"||ue[1].type==="lineEndingBlank"){if(ue[0]==="exit")continue;ie&&(m[ie][1].type="lineEndingBlank",Y=!0),ue[1].type="lineEnding",ie=Se}else if(!(ue[1].type==="linePrefix"||ue[1].type==="blockQuotePrefix"||ue[1].type==="blockQuotePrefixWhitespace"||ue[1].type==="blockQuoteMarker"||ue[1].type==="listItemIndent"))break}me&&(!ie||me<ie)&&(le._spread=!0),le.end=Object.assign({},ie?m[ie][1].start:H[1].end),m.splice(ie||z,0,["exit",le,H[2]]),z++,b++}H[1].type==="listItemPrefix"&&(le={type:"listItem",_spread:!1,start:Object.assign({},H[1].start),end:void 0},m.splice(z,0,["enter",le,H[2]]),z++,b++,me=void 0,ge=!0)}}return m[k][1]._spread=Y,b}function c(m,k){t[m]=k}function i(m){return t[m]}function o(m,k){return b;function b(z){a.call(this,m(z),z),k&&k.call(this,z)}}function p(){this.stack.push({type:"fragment",children:[]})}function a(m,k,b){return this.stack[this.stack.length-1].children.push(m),this.stack.push(m),this.tokenStack.push([k,b]),m.position={start:oe(k.start)},m}function d(m){return k;function k(b){m&&m.call(this,b),h.call(this,b)}}function h(m,k){const b=this.stack.pop(),z=this.tokenStack.pop();if(z)z[0].type!==m.type&&(k?k.call(this,m,z[0]):(z[1]||Ye).call(this,m,z[0]));else throw new Error("Cannot close `"+m.type+"` ("+ye({start:m.start,end:m.end})+"): it’s not open");return b.position.end=oe(m.end),b}function g(){return zt(this.stack.pop())}function f(){c("expectingFirstListItemValue",!0)}function I(m){if(i("expectingFirstListItemValue")){const k=this.stack[this.stack.length-2];k.start=Number.parseInt(this.sliceSerialize(m),10),c("expectingFirstListItemValue")}}function C(){const m=this.resume(),k=this.stack[this.stack.length-1];k.lang=m}function L(){const m=this.resume(),k=this.stack[this.stack.length-1];k.meta=m}function y(){i("flowCodeInside")||(this.buffer(),c("flowCodeInside",!0))}function O(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c("flowCodeInside")}function S(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m.replace(/(\r?\n|\r)$/g,"")}function B(m){const k=this.resume(),b=this.stack[this.stack.length-1];b.label=k,b.identifier=he(this.sliceSerialize(m)).toLowerCase()}function P(){const m=this.resume(),k=this.stack[this.stack.length-1];k.title=m}function x(){const m=this.resume(),k=this.stack[this.stack.length-1];k.url=m}function w(m){const k=this.stack[this.stack.length-1];if(!k.depth){const b=this.sliceSerialize(m).length;k.depth=b}}function R(){c("setextHeadingSlurpLineEnding",!0)}function q(m){const k=this.stack[this.stack.length-1];k.depth=this.sliceSerialize(m).charCodeAt(0)===61?1:2}function V(){c("setextHeadingSlurpLineEnding")}function F(m){const k=this.stack[this.stack.length-1];let b=k.children[k.children.length-1];(!b||b.type!=="text")&&(b=St(),b.position={start:oe(m.start)},k.children.push(b)),this.stack.push(b)}function v(m){const k=this.stack.pop();k.value+=this.sliceSerialize(m),k.position.end=oe(m.end)}function M(m){const k=this.stack[this.stack.length-1];if(i("atHardBreak")){const b=k.children[k.children.length-1];b.position.end=oe(m.end),c("atHardBreak");return}!i("setextHeadingSlurpLineEnding")&&r.canContainEols.includes(k.type)&&(F.call(this,m),v.call(this,m))}function j(){c("atHardBreak",!0)}function A(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function W(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function N(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function G(){const m=this.stack[this.stack.length-1];if(i("inReference")){const k=i("referenceType")||"shortcut";m.type+="Reference",m.referenceType=k,delete m.url,delete m.title}else delete m.identifier,delete m.label;c("referenceType")}function ne(){const m=this.stack[this.stack.length-1];if(i("inReference")){const k=i("referenceType")||"shortcut";m.type+="Reference",m.referenceType=k,delete m.url,delete m.title}else delete m.identifier,delete m.label;c("referenceType")}function s(m){const k=this.sliceSerialize(m),b=this.stack[this.stack.length-2];b.label=zr(k),b.identifier=he(k).toLowerCase()}function J(){const m=this.stack[this.stack.length-1],k=this.resume(),b=this.stack[this.stack.length-1];if(c("inReference",!0),b.type==="link"){const z=m.children;b.children=z}else b.alt=k}function re(){const m=this.resume(),k=this.stack[this.stack.length-1];k.url=m}function l(){const m=this.resume(),k=this.stack[this.stack.length-1];k.title=m}function X(){c("inReference")}function ae(){c("referenceType","collapsed")}function U(m){const k=this.resume(),b=this.stack[this.stack.length-1];b.label=k,b.identifier=he(this.sliceSerialize(m)).toLowerCase(),c("referenceType","full")}function fe(m){c("characterReferenceType",m.type)}function ce(m){const k=this.sliceSerialize(m),b=i("characterReferenceType");let z;b?(z=at(k,b==="characterReferenceMarkerNumeric"?10:16),c("characterReferenceType")):z=ze(k);const D=this.stack.pop();D.value+=z,D.position.end=oe(m.end)}function de(m){v.call(this,m);const k=this.stack[this.stack.length-1];k.url=this.sliceSerialize(m)}function pe(m){v.call(this,m);const k=this.stack[this.stack.length-1];k.url="mailto:"+this.sliceSerialize(m)}function ve(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function mt(){return{type:"inlineCode",value:""}}function gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:void 0,children:[]}}function Oe(){return{type:"break"}}function je(){return{type:"html",value:""}}function kt(){return{type:"image",title:null,url:"",alt:null}}function He(){return{type:"link",title:null,url:"",children:[]}}function Re(m){return{type:"list",ordered:m.type==="listOrdered",start:null,spread:m._spread,children:[]}}function yt(m){return{type:"listItem",spread:m._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function bt(){return{type:"thematicBreak"}}}function oe(e){return{line:e.line,column:e.column,offset:e.offset}}function pt(e,r){let t=-1;for(;++t<r.length;){const n=r[t];Array.isArray(n)?pt(e,n):Br(e,n)}}function Br(e,r){let t;for(t in r)if(ft.call(r,t)){if(t==="canContainEols"){const n=r[t];n&&e[t].push(...n)}else if(t==="transforms"){const n=r[t];n&&e[t].push(...n)}else if(t==="enter"||t==="exit"){const n=r[t];n&&Object.assign(e[t],n)}}}function Ye(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+ye({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+ye({start:r.start,end:r.end})+") is still open")}function Mr(e){const r=e.replace(/\n{2,}/g,`
4
- `);return Ct(r)}function Pr(e){const r=Mr(e),{children:t}=dt(r),n=[[]];let u=0;function c(i,o="normal"){i.type==="text"?i.value.split(`
5
- `).forEach((p,a)=>{a!==0&&(u++,n.push([])),p.split(" ").forEach(d=>{d&&n[u].push({content:d,type:o})})}):(i.type==="strong"||i.type==="emphasis")&&i.children.forEach(p=>{c(p,i.type)})}return t.forEach(i=>{i.type==="paragraph"&&i.children.forEach(o=>{c(o)})}),n}function Lr(e){const{children:r}=dt(e);function t(n){return n.type==="text"?n.value.replace(/\n/g,"<br/>"):n.type==="strong"?`<strong>${n.children.map(t).join("")}</strong>`:n.type==="emphasis"?`<em>${n.children.map(t).join("")}</em>`:n.type==="paragraph"?`<p>${n.children.map(t).join("")}</p>`:`Unsupported markdown: ${n.type}`}return r.map(t).join("")}function Or(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(r=>r.segment):[...e]}function jr(e,r){const t=Or(r.content);return ht(e,[],t,r.type)}function ht(e,r,t,n){if(t.length===0)return[{content:r.join(""),type:n},{content:"",type:n}];const[u,...c]=t,i=[...r,u];return e([{content:i.join(""),type:n}])?ht(e,i,c,n):(r.length===0&&u&&(r.push(u),t.shift()),[{content:r.join(""),type:n},{content:t.join(""),type:n}])}function Hr(e,r){if(e.some(({content:t})=>t.includes(`
6
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return we(e,r)}function we(e,r,t=[],n=[]){if(e.length===0)return n.length>0&&t.push(n),t.length>0?t:[];let u="";e[0].content===" "&&(u=" ",e.shift());const c=e.shift()??{content:" ",type:"normal"},i=[...n];if(u!==""&&i.push({content:u,type:"normal"}),i.push(c),r(i))return we(e,r,t,i);if(n.length>0)t.push(n),e.unshift(c);else if(c.content){const[o,p]=jr(r,c);t.push([o]),p.content&&e.unshift(p)}return we(e,r,t)}function Rr(e,r){r&&e.attr("style",r)}function qr(e,r,t,n,u=!1){const c=e.append("foreignObject"),i=c.append("xhtml:div"),o=r.label,p=r.isNode?"nodeLabel":"edgeLabel";i.html(It(`
7
- <span class="${p} ${n}" `+(r.labelStyle?'style="'+r.labelStyle+'"':"")+">"+o+"</span>",Tt())),Rr(i,r.labelStyle),i.style("display","table-cell"),i.style("white-space","nowrap"),i.style("max-width",t+"px"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),u&&i.attr("class","labelBkg");let a=i.node().getBoundingClientRect();return a.width===t&&(i.style("display","table"),i.style("white-space","break-spaces"),i.style("width",t+"px"),a=i.node().getBoundingClientRect()),c.style("width",a.width),c.style("height",a.height),c.node()}function Be(e,r,t){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",r*t-.1+"em").attr("dy",t+"em")}function Vr(e,r,t){const n=e.append("text"),u=Be(n,1,r);Me(u,t);const c=u.node().getComputedTextLength();return n.remove(),c}function Wr(e,r,t){var n;const u=e.append("text"),c=Be(u,1,r);Me(c,[{content:t,type:"normal"}]);const i=(n=c.node())==null?void 0:n.getBoundingClientRect();return i&&u.remove(),i}function Nr(e,r,t,n=!1){const u=r.append("g"),c=u.insert("rect").attr("class","background"),i=u.append("text").attr("y","-10.1");let o=0;for(const p of t){const a=h=>Vr(u,1.1,h)<=e,d=a(p)?[p]:Hr(p,a);for(const h of d){const g=Be(i,o,1.1);Me(g,h),o++}}if(n){const p=i.node().getBBox(),a=2;return c.attr("x",-a).attr("y",-a).attr("width",p.width+2*a).attr("height",p.height+2*a),u.node()}else return i.node()}function Me(e,r){e.text(""),r.forEach((t,n)=>{const u=e.append("tspan").attr("font-style",t.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",t.type==="strong"?"bold":"normal");n===0?u.text(t.content):u.text(" "+t.content)})}const $r=(e,r="",{style:t="",isTitle:n=!1,classes:u="",useHtmlLabels:c=!0,isNode:i=!0,width:o=200,addSvgBackground:p=!1}={})=>{if(Et.info("createText",r,t,n,u,c,i,p),c){const a=Lr(r),d={isNode:i,label:At(a).replace(/fa[blrs]?:fa-[\w-]+/g,h=>`<i class='${h.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return qr(e,d,o,u,p)}else{const a=Pr(r);return Nr(o,e,a,p)}};export{$r as $,Wr as U};
@@ -1,4 +0,0 @@
1
- import{O as f,d as lt,o as ot,E as w,x as W,F as _,f as N,W as F,br as q}from"./index-CBAg0_Do.js";import{$ as nt}from"./createText-1719965b-C2-AT0ab-CSaYVcyR.js";const dt=(a,t,e,s)=>{t.forEach(l=>{bt[l](a,e,s)})},ht=(a,t,e)=>{f.trace("Making markers for ",e),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},ct=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},yt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},pt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},gt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},xt=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},ft=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},ut=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},wt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},bt={extension:ht,composition:ct,aggregation:yt,dependency:pt,lollipop:gt,point:xt,circle:ft,cross:ut,barb:wt},or=dt;function mt(a,t){t&&a.attr("style",t)}function kt(a,t){const e=_(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),s=e.append("xhtml:div"),l=a.label,r=a.isNode?"nodeLabel":"edgeLabel";return s.html(F('<span class="'+r+'" '+(a.labelStyle?'style="'+a.labelStyle+'"':"")+">"+l+"</span>",t)),mt(s,a.labelStyle),s.style("display","inline-block"),s.style("white-space","nowrap"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const Lt=(a,t,e,s)=>{let l=a||"";typeof l=="object"&&(l=l[0]);const r=w();if(W(r.flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"<br />"),f.debug("vertexText"+l);const n={isNode:s,label:q(l).replace(/fa[blrs]?:fa-[\w-]+/g,i=>`<i class='${i.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return kt(n,r)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",t.replace("color:","fill:"));let i=[];typeof l=="string"?i=l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?i=l:i=[];for(const o of i){const h=document.createElementNS("http://www.w3.org/2000/svg","tspan");h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),h.setAttribute("dy","1em"),h.setAttribute("x","0"),e?h.setAttribute("class","title-row"):h.setAttribute("class","row"),h.textContent=o.trim(),n.appendChild(h)}return n}},P=Lt,M=async(a,t,e,s)=>{let l;const r=t.useHtmlLabels||W(w().flowchart.htmlLabels);e?l=e:l="node default";const n=a.insert("g").attr("class",l).attr("id",t.domId||t.id),i=n.insert("g").attr("class","label").attr("style",t.labelStyle);let o;t.labelText===void 0?o="":o=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=i.node();let d;t.labelType==="markdown"?d=nt(i,F(q(o),w()),{useHtmlLabels:r,width:t.width||w().flowchart.wrappingWidth,classes:"markdown-node-label"}):d=h.appendChild(P(F(q(o),w()),t.labelStyle,!1,s));let c=d.getBBox();const p=t.padding/2;if(W(w().flowchart.htmlLabels)){const y=d.children[0],x=_(d),k=y.getElementsByTagName("img");if(k){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...k].map(u=>new Promise(v=>{function B(){if(u.style.display="flex",u.style.flexDirection="column",g){const C=w().fontSize?w().fontSize:window.getComputedStyle(document.body).fontSize,X=parseInt(C,10)*5+"px";u.style.minWidth=X,u.style.maxWidth=X}else u.style.width="100%";v(u)}setTimeout(()=>{u.complete&&B()}),u.addEventListener("error",B),u.addEventListener("load",B)})))}c=y.getBoundingClientRect(),x.attr("width",c.width),x.attr("height",c.height)}return r?i.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):i.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&i.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:n,bbox:c,halfPadding:p,label:i}},m=(a,t)=>{const e=t.node().getBBox();a.width=e.width,a.height=e.height};function O(a,t,e,s){return a.insert("polygon",":first-child").attr("points",s.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+e/2+")")}function St(a,t){return a.intersect(t)}function st(a,t,e,s){var l=a.x,r=a.y,n=l-s.x,i=r-s.y,o=Math.sqrt(t*t*i*i+e*e*n*n),h=Math.abs(t*e*n/o);s.x<l&&(h=-h);var d=Math.abs(t*e*i/o);return s.y<r&&(d=-d),{x:l+h,y:r+d}}function vt(a,t,e){return st(a,t,t,e)}function Mt(a,t,e,s){var l,r,n,i,o,h,d,c,p,y,x,k,g,u,v;if(l=t.y-a.y,n=a.x-t.x,o=t.x*a.y-a.x*t.y,p=l*e.x+n*e.y+o,y=l*s.x+n*s.y+o,!(p!==0&&y!==0&&J(p,y))&&(r=s.y-e.y,i=e.x-s.x,h=s.x*e.y-e.x*s.y,d=r*a.x+i*a.y+h,c=r*t.x+i*t.y+h,!(d!==0&&c!==0&&J(d,c))&&(x=l*i-r*n,x!==0)))return k=Math.abs(x/2),g=n*h-i*o,u=g<0?(g-k)/x:(g+k)/x,g=r*o-l*h,v=g<0?(g-k)/x:(g+k)/x,{x:u,y:v}}function J(a,t){return a*t>0}function Tt(a,t,e){var s=a.x,l=a.y,r=[],n=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(x){n=Math.min(n,x.x),i=Math.min(i,x.y)}):(n=Math.min(n,t.x),i=Math.min(i,t.y));for(var o=s-a.width/2-n,h=l-a.height/2-i,d=0;d<t.length;d++){var c=t[d],p=t[d<t.length-1?d+1:0],y=Mt(a,e,{x:o+c.x,y:h+c.y},{x:o+p.x,y:h+p.y});y&&r.push(y)}return r.length?(r.length>1&&r.sort(function(x,k){var g=x.x-e.x,u=x.y-e.y,v=Math.sqrt(g*g+u*u),B=k.x-e.x,C=k.y-e.y,X=Math.sqrt(B*B+C*C);return v<X?-1:v===X?0:1}),r[0]):a}const Bt=(a,t)=>{var e=a.x,s=a.y,l=t.x-e,r=t.y-s,n=a.width/2,i=a.height/2,o,h;return Math.abs(r)*n>Math.abs(l)*i?(r<0&&(i=-i),o=r===0?0:i*l/r,h=i):(l<0&&(n=-n),o=n,h=l===0?0:n*r/l),{x:e+o,y:s+h}},_t=Bt,b={node:St,circle:vt,ellipse:st,polygon:Tt,rect:_t},Ct=async(a,t)=>{t.useHtmlLabels||w().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:e,bbox:s,halfPadding:l}=await M(a,t,"node "+t.classes,!0);f.info("Classes = ",t.classes);const r=e.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-s.width/2-l).attr("y",-s.height/2-l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),m(t,r),t.intersect=function(n){return b.rect(t,n)},e},Et=Ct,$t=a=>{const t=new Set;for(const e of a)switch(e){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(e);break}return t},Pt=(a,t,e)=>{const s=$t(a),l=2,r=t.height+2*e.padding,n=r/l,i=t.width+2*n+e.padding,o=e.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:n,y:0},{x:i/2,y:2*o},{x:i-n,y:0},{x:i,y:0},{x:i,y:-r/3},{x:i+2*o,y:-r/2},{x:i,y:-2*r/3},{x:i,y:-r},{x:i-n,y:-r},{x:i/2,y:-r-2*o},{x:n,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*o,y:-r/2},{x:0,y:-r/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:n,y:0},{x:i-n,y:0},{x:i,y:-r/2},{x:i-n,y:-r},{x:n,y:-r},{x:0,y:-r/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:n,y:-r},{x:i-n,y:-r},{x:i,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:-n},{x:i,y:-r+n},{x:0,y:-r}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:i,y:0},{x:0,y:-n},{x:0,y:-r+n},{x:i,y:-r}]:s.has("right")&&s.has("left")?[{x:n,y:0},{x:n,y:-o},{x:i-n,y:-o},{x:i-n,y:0},{x:i,y:-r/2},{x:i-n,y:-r},{x:i-n,y:-r+o},{x:n,y:-r+o},{x:n,y:-r},{x:0,y:-r/2}]:s.has("up")&&s.has("down")?[{x:i/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-r+o},{x:0,y:-r+o},{x:i/2,y:-r},{x:i,y:-r+o},{x:i-n,y:-r+o},{x:i-n,y:-o},{x:i,y:-o}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:i,y:-n},{x:0,y:-r}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:0,y:-r}]:s.has("left")&&s.has("up")?[{x:i,y:0},{x:0,y:-n},{x:i,y:-r}]:s.has("left")&&s.has("down")?[{x:i,y:0},{x:0,y:0},{x:i,y:-r}]:s.has("right")?[{x:n,y:-o},{x:n,y:-o},{x:i-n,y:-o},{x:i-n,y:0},{x:i,y:-r/2},{x:i-n,y:-r},{x:i-n,y:-r+o},{x:n,y:-r+o},{x:n,y:-r+o}]:s.has("left")?[{x:n,y:0},{x:n,y:-o},{x:i-n,y:-o},{x:i-n,y:-r+o},{x:n,y:-r+o},{x:n,y:-r},{x:0,y:-r/2}]:s.has("up")?[{x:n,y:-o},{x:n,y:-r+o},{x:0,y:-r+o},{x:i/2,y:-r},{x:i,y:-r+o},{x:i-n,y:-r+o},{x:i-n,y:-o}]:s.has("down")?[{x:i/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-r+o},{x:i-n,y:-r+o},{x:i-n,y:-o},{x:i,y:-o}]:[{x:0,y:0}]},Q=a=>a?" "+a:"",$=(a,t)=>`node default${Q(a.classes)} ${Q(a.class)}`,K=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=l+r,i=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];f.info("Question main (Circle)");const o=O(e,n,n,i);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return f.warn("Intersect called"),b.polygon(t,i,h)},e},Wt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=28,l=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}];return e.insert("polygon",":first-child").attr("points",l.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return b.circle(t,14,r)},e},Ot=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=4,r=s.height+t.padding,n=r/l,i=s.width+2*n+t.padding,o=[{x:n,y:0},{x:i-n,y:0},{x:i,y:-r/2},{x:i-n,y:-r},{x:n,y:-r},{x:0,y:-r/2}],h=O(e,i,r,o);return h.attr("style",t.style),m(t,h),t.intersect=function(d){return b.polygon(t,o,d)},e},Rt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,void 0,!0),l=2,r=s.height+2*t.padding,n=r/l,i=s.width+2*n+t.padding,o=Pt(t.directions,s,t),h=O(e,i,r,o);return h.attr("style",t.style),m(t,h),t.intersect=function(d){return b.polygon(t,o,d)},e},Xt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:-r/2,y:0},{x:l,y:0},{x:l,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return O(e,l,r,n).attr("style",t.style),t.width=l+r,t.height=r,t.intersect=function(i){return b.polygon(t,n,i)},e},Yt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:-2*r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:r/6,y:-r}],i=O(e,l,r,n);return i.attr("style",t.style),m(t,i),t.intersect=function(o){return b.polygon(t,n,o)},e},It=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:2*r/6,y:0},{x:l+r/6,y:0},{x:l-2*r/6,y:-r},{x:-r/6,y:-r}],i=O(e,l,r,n);return i.attr("style",t.style),m(t,i),t.intersect=function(o){return b.polygon(t,n,o)},e},Dt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:-2*r/6,y:0},{x:l+2*r/6,y:0},{x:l-r/6,y:-r},{x:r/6,y:-r}],i=O(e,l,r,n);return i.attr("style",t.style),m(t,i),t.intersect=function(o){return b.polygon(t,n,o)},e},Ht=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:-2*r/6,y:-r}],i=O(e,l,r,n);return i.attr("style",t.style),m(t,i),t.intersect=function(o){return b.polygon(t,n,o)},e},Nt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:0,y:0},{x:l+r/2,y:0},{x:l,y:-r/2},{x:l+r/2,y:-r},{x:0,y:-r}],i=O(e,l,r,n);return i.attr("style",t.style),m(t,i),t.intersect=function(o){return b.polygon(t,n,o)},e},jt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=l/2,n=r/(2.5+l/50),i=s.height+n+t.padding,o="M 0,"+n+" a "+r+","+n+" 0,0,0 "+l+" 0 a "+r+","+n+" 0,0,0 "+-l+" 0 l 0,"+i+" a "+r+","+n+" 0,0,0 "+l+" 0 l 0,"+-i,h=e.attr("label-offset-y",n).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-l/2+","+-(i/2+n)+")");return m(t,h),t.intersect=function(d){const c=b.rect(t,d),p=c.x-t.x;if(r!=0&&(Math.abs(p)<t.width/2||Math.abs(p)==t.width/2&&Math.abs(c.y-t.y)>t.height/2-n)){let y=n*n*(1-p*p/(r*r));y!=0&&(y=Math.sqrt(y)),y=n-y,d.y-t.y>0&&(y=-y),c.y+=y}return c},e},Ut=async(a,t)=>{const{shapeSvg:e,bbox:s,halfPadding:l}=await M(a,t,"node "+t.classes+" "+t.class,!0),r=e.insert("rect",":first-child"),n=t.positioned?t.width:s.width+t.padding,i=t.positioned?t.height:s.height+t.padding,o=t.positioned?-n/2:-s.width/2-l,h=t.positioned?-i/2:-s.height/2-l;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",h).attr("width",n).attr("height",i),t.props){const d=new Set(Object.keys(t.props));t.props.borders&&(G(r,t.props.borders,n,i),d.delete("borders")),d.forEach(c=>{f.warn(`Unknown node property ${c}`)})}return m(t,r),t.intersect=function(d){return b.rect(t,d)},e},At=async(a,t)=>{const{shapeSvg:e,bbox:s,halfPadding:l}=await M(a,t,"node "+t.classes,!0),r=e.insert("rect",":first-child"),n=t.positioned?t.width:s.width+t.padding,i=t.positioned?t.height:s.height+t.padding,o=t.positioned?-n/2:-s.width/2-l,h=t.positioned?-i/2:-s.height/2-l;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",h).attr("width",n).attr("height",i),t.props){const d=new Set(Object.keys(t.props));t.props.borders&&(G(r,t.props.borders,n,i),d.delete("borders")),d.forEach(c=>{f.warn(`Unknown node property ${c}`)})}return m(t,r),t.intersect=function(d){return b.rect(t,d)},e},Zt=async(a,t)=>{const{shapeSvg:e}=await M(a,t,"label",!0);f.trace("Classes = ",t.class);const s=e.insert("rect",":first-child"),l=0,r=0;if(s.attr("width",l).attr("height",r),e.attr("class","label edgeLabel"),t.props){const n=new Set(Object.keys(t.props));t.props.borders&&(G(s,t.props.borders,l,r),n.delete("borders")),n.forEach(i=>{f.warn(`Unknown node property ${i}`)})}return m(t,s),t.intersect=function(n){return b.rect(t,n)},e};function G(a,t,e,s){const l=[],r=i=>{l.push(i,0)},n=i=>{l.push(0,i)};t.includes("t")?(f.debug("add top border"),r(e)):n(e),t.includes("r")?(f.debug("add right border"),r(s)):n(s),t.includes("b")?(f.debug("add bottom border"),r(e)):n(e),t.includes("l")?(f.debug("add left border"),r(s)):n(s),a.attr("stroke-dasharray",l.join(" "))}const zt=(a,t)=>{let e;t.classes?e="node "+t.classes:e="node default";const s=a.insert("g").attr("class",e).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),r=s.insert("line"),n=s.insert("g").attr("class","label"),i=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof i=="object"?o=i[0]:o=i,f.info("Label text abc79",o,i,typeof i=="object");const h=n.node().appendChild(P(o,t.labelStyle,!0,!0));let d={width:0,height:0};if(W(w().flowchart.htmlLabels)){const k=h.children[0],g=_(h);d=k.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}f.info("Text 2",i);const c=i.slice(1,i.length);let p=h.getBBox();const y=n.node().appendChild(P(c.join?c.join("<br/>"):c,t.labelStyle,!0,!0));if(W(w().flowchart.htmlLabels)){const k=y.children[0],g=_(y);d=k.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}const x=t.padding/2;return _(y).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+x+5)+")"),_(h).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")"),l.attr("class","outer title-state").attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+t.padding).attr("height",d.height+t.padding),r.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+p.height+x).attr("y2",-d.height/2-x+p.height+x),m(t,l),t.intersect=function(k){return b.rect(t,k)},s},Ft=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.height+t.padding,r=s.width+l/4+t.padding,n=e.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-r/2).attr("y",-l/2).attr("width",r).attr("height",l);return m(t,n),t.intersect=function(i){return b.rect(t,i)},e},qt=async(a,t)=>{const{shapeSvg:e,bbox:s,halfPadding:l}=await M(a,t,$(t),!0),r=e.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),f.info("Circle main"),m(t,r),t.intersect=function(n){return f.info("Circle intersect",t,s.width/2+l,n),b.circle(t,s.width/2+l,n)},e},Gt=async(a,t)=>{const{shapeSvg:e,bbox:s,halfPadding:l}=await M(a,t,$(t),!0),r=5,n=e.insert("g",":first-child"),i=n.insert("circle"),o=n.insert("circle");return n.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+l+r).attr("width",s.width+t.padding+r*2).attr("height",s.height+t.padding+r*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),f.info("DoubleCircle main"),m(t,i),t.intersect=function(h){return f.info("DoubleCircle intersect",t,s.width/2+l+r,h),b.circle(t,s.width/2+l+r,h)},e},Vt=async(a,t)=>{const{shapeSvg:e,bbox:s}=await M(a,t,$(t),!0),l=s.width+t.padding,r=s.height+t.padding,n=[{x:0,y:0},{x:l,y:0},{x:l,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],i=O(e,l,r,n);return i.attr("style",t.style),m(t,i),t.intersect=function(o){return b.polygon(t,n,o)},e},Jt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=e.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),m(t,s),t.intersect=function(l){return b.circle(t,7,l)},e},tt=(a,t,e)=>{const s=a.insert("g").attr("class","node default").attr("id",t.domId||t.id);let l=70,r=10;e==="LR"&&(l=10,r=70);const n=s.append("rect").attr("x",-1*l/2).attr("y",-1*r/2).attr("width",l).attr("height",r).attr("class","fork-join");return m(t,n),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(i){return b.rect(t,i)},s},Qt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=e.insert("circle",":first-child"),l=e.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),m(t,l),t.intersect=function(r){return b.circle(t,7,r)},e},Kt=(a,t)=>{const e=t.padding/2,s=4,l=8;let r;t.classes?r="node "+t.classes:r="node default";const n=a.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),o=n.insert("line"),h=n.insert("line");let d=0,c=s;const p=n.insert("g").attr("class","label");let y=0;const x=t.classData.annotations&&t.classData.annotations[0],k=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",g=p.node().appendChild(P(k,t.labelStyle,!0,!0));let u=g.getBBox();if(W(w().flowchart.htmlLabels)){const L=g.children[0],S=_(g);u=L.getBoundingClientRect(),S.attr("width",u.width),S.attr("height",u.height)}t.classData.annotations[0]&&(c+=u.height+s,d+=u.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(w().flowchart.htmlLabels?v+="&lt;"+t.classData.type+"&gt;":v+="<"+t.classData.type+">");const B=p.node().appendChild(P(v,t.labelStyle,!0,!0));_(B).attr("class","classTitle");let C=B.getBBox();if(W(w().flowchart.htmlLabels)){const L=B.children[0],S=_(B);C=L.getBoundingClientRect(),S.attr("width",C.width),S.attr("height",C.height)}c+=C.height+s,C.width>d&&(d=C.width);const X=[];t.classData.members.forEach(L=>{const S=L.getDisplayDetails();let I=S.displayText;w().flowchart.htmlLabels&&(I=I.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const R=p.node().appendChild(P(I,S.cssStyle?S.cssStyle:t.labelStyle,!0,!0));let E=R.getBBox();if(W(w().flowchart.htmlLabels)){const z=R.children[0],H=_(R);E=z.getBoundingClientRect(),H.attr("width",E.width),H.attr("height",E.height)}E.width>d&&(d=E.width),c+=E.height+s,X.push(R)}),c+=l;const V=[];if(t.classData.methods.forEach(L=>{const S=L.getDisplayDetails();let I=S.displayText;w().flowchart.htmlLabels&&(I=I.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const R=p.node().appendChild(P(I,S.cssStyle?S.cssStyle:t.labelStyle,!0,!0));let E=R.getBBox();if(W(w().flowchart.htmlLabels)){const z=R.children[0],H=_(R);E=z.getBoundingClientRect(),H.attr("width",E.width),H.attr("height",E.height)}E.width>d&&(d=E.width),c+=E.height+s,V.push(R)}),c+=l,x){let L=(d-u.width)/2;_(g).attr("transform","translate( "+(-1*d/2+L)+", "+-1*c/2+")"),y=u.height+s}let it=(d-C.width)/2;return _(B).attr("transform","translate( "+(-1*d/2+it)+", "+(-1*c/2+y)+")"),y+=C.height+s,o.attr("class","divider").attr("x1",-d/2-e).attr("x2",d/2+e).attr("y1",-c/2-e+l+y).attr("y2",-c/2-e+l+y),y+=l,X.forEach(L=>{_(L).attr("transform","translate( "+-d/2+", "+(-1*c/2+y+l/2)+")");const S=L==null?void 0:L.getBBox();y+=((S==null?void 0:S.height)??0)+s}),y+=l,h.attr("class","divider").attr("x1",-d/2-e).attr("x2",d/2+e).attr("y1",-c/2-e+l+y).attr("y2",-c/2-e+l+y),y+=l,V.forEach(L=>{_(L).attr("transform","translate( "+-d/2+", "+(-1*c/2+y)+")");const S=L==null?void 0:L.getBBox();y+=((S==null?void 0:S.height)??0)+s}),i.attr("style",t.style).attr("class","outer title-state").attr("x",-d/2-e).attr("y",-(c/2)-e).attr("width",d+t.padding).attr("height",c+t.padding),m(t,i),t.intersect=function(L){return b.rect(t,L)},n},rt={rhombus:K,composite:At,question:K,rect:Ut,labelRect:Zt,rectWithTitle:zt,choice:Wt,circle:qt,doublecircle:Gt,stadium:Ft,hexagon:Ot,block_arrow:Rt,rect_left_inv_arrow:Xt,lean_right:Yt,lean_left:It,trapezoid:Dt,inv_trapezoid:Ht,rect_right_inv_arrow:Nt,cylinder:jt,start:Jt,end:Qt,note:Et,subroutine:Vt,fork:tt,join:tt,class_box:Kt};let D={};const dr=async(a,t,e)=>{let s,l;if(t.link){let r;w().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),s=a.insert("svg:a").attr("xlink:href",t.link).attr("target",r),l=await rt[t.shape](s,t,e)}else l=await rt[t.shape](a,t,e),s=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),s.attr("data-node","true"),s.attr("data-id",t.id),D[t.id]=s,t.haveCallback&&D[t.id].attr("class",D[t.id].attr("class")+" clickable"),s},hr=(a,t)=>{D[t.id]=a},cr=()=>{D={}},yr=a=>{const t=D[a.id];f.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");const e=8,s=a.diff||0;return a.clusterNode?t.attr("transform","translate("+(a.x+s-a.width/2)+", "+(a.y-a.height/2-e)+")"):t.attr("transform","translate("+a.x+", "+a.y+")"),s},tr=({flowchart:a})=>{var t,e;const s=((t=a==null?void 0:a.subGraphTitleMargin)==null?void 0:t.top)??0,l=((e=a==null?void 0:a.subGraphTitleMargin)==null?void 0:e.bottom)??0,r=s+l;return{subGraphTitleTopMargin:s,subGraphTitleBottomMargin:l,subGraphTitleTotalMargin:r}},Y={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function j(a,t){if(a===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};a=A(a),t=A(t);const[e,s]=[a.x,a.y],[l,r]=[t.x,t.y],n=l-e,i=r-s;return{angle:Math.atan(i/n),deltaX:n,deltaY:i}}const A=a=>Array.isArray(a)?{x:a[0],y:a[1]}:a,rr=a=>({x:function(t,e,s){let l=0;if(e===0&&Object.hasOwn(Y,a.arrowTypeStart)){const{angle:r,deltaX:n}=j(s[0],s[1]);l=Y[a.arrowTypeStart]*Math.cos(r)*(n>=0?1:-1)}else if(e===s.length-1&&Object.hasOwn(Y,a.arrowTypeEnd)){const{angle:r,deltaX:n}=j(s[s.length-1],s[s.length-2]);l=Y[a.arrowTypeEnd]*Math.cos(r)*(n>=0?1:-1)}return A(t).x+l},y:function(t,e,s){let l=0;if(e===0&&Object.hasOwn(Y,a.arrowTypeStart)){const{angle:r,deltaY:n}=j(s[0],s[1]);l=Y[a.arrowTypeStart]*Math.abs(Math.sin(r))*(n>=0?1:-1)}else if(e===s.length-1&&Object.hasOwn(Y,a.arrowTypeEnd)){const{angle:r,deltaY:n}=j(s[s.length-1],s[s.length-2]);l=Y[a.arrowTypeEnd]*Math.abs(Math.sin(r))*(n>=0?1:-1)}return A(t).y+l}}),er=(a,t,e,s,l)=>{t.arrowTypeStart&&et(a,"start",t.arrowTypeStart,e,s,l),t.arrowTypeEnd&&et(a,"end",t.arrowTypeEnd,e,s,l)},ar={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},et=(a,t,e,s,l,r)=>{const n=ar[e];if(!n){f.warn(`Unknown arrow type: ${e}`);return}const i=t==="start"?"Start":"End";a.attr(`marker-${t}`,`url(${s}#${l}_${r}-${n}${i})`)};let Z={},T={};const pr=()=>{Z={},T={}},gr=(a,t)=>{const e=W(w().flowchart.htmlLabels),s=t.labelType==="markdown"?nt(a,t.label,{style:t.labelStyle,useHtmlLabels:e,addSvgBackground:!0}):P(t.label,t.labelStyle),l=a.insert("g").attr("class","edgeLabel"),r=l.insert("g").attr("class","label");r.node().appendChild(s);let n=s.getBBox();if(e){const o=s.children[0],h=_(s);n=o.getBoundingClientRect(),h.attr("width",n.width),h.attr("height",n.height)}r.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Z[t.id]=l,t.width=n.width,t.height=n.height;let i;if(t.startLabelLeft){const o=P(t.startLabelLeft,t.labelStyle),h=a.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");i=d.node().appendChild(o);const c=o.getBBox();d.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),T[t.id]||(T[t.id]={}),T[t.id].startLeft=h,U(i,t.startLabelLeft)}if(t.startLabelRight){const o=P(t.startLabelRight,t.labelStyle),h=a.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");i=h.node().appendChild(o),d.node().appendChild(o);const c=o.getBBox();d.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),T[t.id]||(T[t.id]={}),T[t.id].startRight=h,U(i,t.startLabelRight)}if(t.endLabelLeft){const o=P(t.endLabelLeft,t.labelStyle),h=a.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");i=d.node().appendChild(o);const c=o.getBBox();d.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),h.node().appendChild(o),T[t.id]||(T[t.id]={}),T[t.id].endLeft=h,U(i,t.endLabelLeft)}if(t.endLabelRight){const o=P(t.endLabelRight,t.labelStyle),h=a.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");i=d.node().appendChild(o);const c=o.getBBox();d.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),h.node().appendChild(o),T[t.id]||(T[t.id]={}),T[t.id].endRight=h,U(i,t.endLabelRight)}return s};function U(a,t){w().flowchart.htmlLabels&&a&&(a.style.width=t.length*9+"px",a.style.height="12px")}const xr=(a,t)=>{f.debug("Moving label abc88 ",a.id,a.label,Z[a.id],t);let e=t.updatedPath?t.updatedPath:t.originalPath;const s=w(),{subGraphTitleTotalMargin:l}=tr(s);if(a.label){const r=Z[a.id];let n=a.x,i=a.y;if(e){const o=N.calcLabelPosition(e);f.debug("Moving label "+a.label+" from (",n,",",i,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(n=o.x,i=o.y)}r.attr("transform",`translate(${n}, ${i+l/2})`)}if(a.startLabelLeft){const r=T[a.id].startLeft;let n=a.x,i=a.y;if(e){const o=N.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_left",e);n=o.x,i=o.y}r.attr("transform",`translate(${n}, ${i})`)}if(a.startLabelRight){const r=T[a.id].startRight;let n=a.x,i=a.y;if(e){const o=N.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_right",e);n=o.x,i=o.y}r.attr("transform",`translate(${n}, ${i})`)}if(a.endLabelLeft){const r=T[a.id].endLeft;let n=a.x,i=a.y;if(e){const o=N.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_left",e);n=o.x,i=o.y}r.attr("transform",`translate(${n}, ${i})`)}if(a.endLabelRight){const r=T[a.id].endRight;let n=a.x,i=a.y;if(e){const o=N.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_right",e);n=o.x,i=o.y}r.attr("transform",`translate(${n}, ${i})`)}},nr=(a,t)=>{const e=a.x,s=a.y,l=Math.abs(t.x-e),r=Math.abs(t.y-s),n=a.width/2,i=a.height/2;return l>=n||r>=i},sr=(a,t,e)=>{f.debug(`intersection calc abc89:
2
- outsidePoint: ${JSON.stringify(t)}
3
- insidePoint : ${JSON.stringify(e)}
4
- node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);const s=a.x,l=a.y,r=Math.abs(s-e.x),n=a.width/2;let i=e.x<t.x?n-r:n+r;const o=a.height/2,h=Math.abs(t.y-e.y),d=Math.abs(t.x-e.x);if(Math.abs(l-t.y)*n>Math.abs(s-t.x)*o){let c=e.y<t.y?t.y-o-l:l-o-t.y;i=d*c/h;const p={x:e.x<t.x?e.x+i:e.x-d+i,y:e.y<t.y?e.y+h-c:e.y-h+c};return i===0&&(p.x=t.x,p.y=t.y),d===0&&(p.x=t.x),h===0&&(p.y=t.y),f.debug(`abc89 topp/bott calc, Q ${h}, q ${c}, R ${d}, r ${i}`,p),p}else{e.x<t.x?i=t.x-n-s:i=s-n-t.x;let c=h*i/d,p=e.x<t.x?e.x+d-i:e.x-d+i,y=e.y<t.y?e.y+c:e.y-c;return f.debug(`sides calc abc89, Q ${h}, q ${c}, R ${d}, r ${i}`,{_x:p,_y:y}),i===0&&(p=t.x,y=t.y),d===0&&(p=t.x),h===0&&(y=t.y),{x:p,y}}},at=(a,t)=>{f.debug("abc88 cutPathAtIntersect",a,t);let e=[],s=a[0],l=!1;return a.forEach(r=>{if(!nr(t,r)&&!l){const n=sr(t,s,r);let i=!1;e.forEach(o=>{i=i||o.x===n.x&&o.y===n.y}),e.some(o=>o.x===n.x&&o.y===n.y)||e.push(n),l=!0}else s=r,l||e.push(r)}),e},fr=function(a,t,e,s,l,r,n){let i=e.points;f.debug("abc88 InsertEdge: edge=",e,"e=",t);let o=!1;const h=r.node(t.v);var d=r.node(t.w);d!=null&&d.intersect&&h!=null&&h.intersect&&(i=i.slice(1,e.points.length-1),i.unshift(h.intersect(i[0])),i.push(d.intersect(i[i.length-1]))),e.toCluster&&(f.debug("to cluster abc88",s[e.toCluster]),i=at(e.points,s[e.toCluster].node),o=!0),e.fromCluster&&(f.debug("from cluster abc88",s[e.fromCluster]),i=at(i.reverse(),s[e.fromCluster].node).reverse(),o=!0);const c=i.filter(C=>!Number.isNaN(C.y));let p=ot;e.curve&&(l==="graph"||l==="flowchart")&&(p=e.curve);const{x:y,y:x}=rr(e),k=lt().x(y).y(x).curve(p);let g;switch(e.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;case"invisible":g="edge-thickness-thick";break;default:g=""}switch(e.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed";break}const u=a.append("path").attr("d",k(c)).attr("id",e.id).attr("class"," "+g+(e.classes?" "+e.classes:"")).attr("style",e.style);let v="";(w().flowchart.arrowMarkerAbsolute||w().state.arrowMarkerAbsolute)&&(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,v=v.replace(/\(/g,"\\("),v=v.replace(/\)/g,"\\)")),er(u,e,v,n,l);let B={};return o&&(B.updatedPath=i),B.originalPath=e.points,B};export{_t as E,M,P as R,er as a,or as c,xr as d,pr as f,fr as g,dr as h,m,hr as o,yr as p,rr as r,tr as t,gr as x,cr as y};
@@ -1,51 +0,0 @@
1
- import{j as ft,M as Et,L as mt,D as gt,R as bt,N as kt,E as Z,O as H,F as et,f as Ot,Q as Rt,I as Nt,d as xt,o as Tt,Z as At}from"./index-CBAg0_Do.js";import{K as Mt}from"./graph-BV6jB5rk-BPsWqwd1.js";import{A as wt}from"./layout-LXMv3mSS-D7gLeKlL.js";const It=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function vt(t){return typeof t=="string"&&It.test(t)}const T=[];for(let t=0;t<256;++t)T.push((t+256).toString(16).slice(1));function $t(t,e=0){return T[t[e+0]]+T[t[e+1]]+T[t[e+2]]+T[t[e+3]]+"-"+T[t[e+4]]+T[t[e+5]]+"-"+T[t[e+6]]+T[t[e+7]]+"-"+T[t[e+8]]+T[t[e+9]]+"-"+T[t[e+10]]+T[t[e+11]]+T[t[e+12]]+T[t[e+13]]+T[t[e+14]]+T[t[e+15]]}function Lt(t){if(!vt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Dt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const St="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Bt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Ct(t,e,r){function d(l,p,h,c){var u;if(typeof l=="string"&&(l=Dt(l)),typeof p=="string"&&(p=Lt(p)),((u=p)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+l.length);if(f.set(p),f.set(l,p.length),f=r(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,h){c=c||0;for(let E=0;E<16;++E)h[c+E]=f[E];return h}return $t(f)}try{d.name=t}catch{}return d.DNS=St,d.URL=Bt,d}function Yt(t,e,r,d){switch(t){case 0:return e&r^~e&d;case 1:return e^r^d;case 2:return e&r^e&d^r&d;case 3:return e^r^d}}function rt(t,e){return t<<e|t>>>32-e}function Zt(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const h=unescape(encodeURIComponent(t));t=[];for(let c=0;c<h.length;++c)t.push(h.charCodeAt(c))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const d=t.length/4+2,l=Math.ceil(d/16),p=new Array(l);for(let h=0;h<l;++h){const c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=t[h*64+u*4]<<24|t[h*64+u*4+1]<<16|t[h*64+u*4+2]<<8|t[h*64+u*4+3];p[h]=c}p[l-1][14]=(t.length-1)*8/Math.pow(2,32),p[l-1][14]=Math.floor(p[l-1][14]),p[l-1][15]=(t.length-1)*8&4294967295;for(let h=0;h<l;++h){const c=new Uint32Array(80);for(let _=0;_<16;++_)c[_]=p[h][_];for(let _=16;_<80;++_)c[_]=rt(c[_-3]^c[_-8]^c[_-14]^c[_-16],1);let u=r[0],f=r[1],E=r[2],m=r[3],g=r[4];for(let _=0;_<80;++_){const I=Math.floor(_/20),S=rt(u,5)+Yt(I,f,E,m)+g+e[I]+c[_]>>>0;g=m,m=E,E=rt(f,30)>>>0,f=u,u=S}r[0]=r[0]+u>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+E>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+g>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const Ft=Ct("v5",80,Zt);var at=function(){var t=function(A,i,o,n){for(o=o||{},n=A.length;n--;o[A[n]]=i);return o},e=[6,8,10,20,22,24,26,27,28],r=[1,10],d=[1,11],l=[1,12],p=[1,13],h=[1,14],c=[1,15],u=[1,21],f=[1,22],E=[1,23],m=[1,24],g=[1,25],_=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],I=[1,34],S=[27,28,46,47],F=[41,42,43,44,45],P=[17,34],B=[1,54],N=[1,53],M=[17,34,36,38],k={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(A,i,o,n,y,a,x){var s=a.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[s-4]),n.addEntity(a[s-2]),n.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:n.addEntity(a[s-3]),n.addAttributes(a[s-3],a[s-1]);break;case 10:n.addEntity(a[s-2]);break;case 11:n.addEntity(a[s]);break;case 12:n.addEntity(a[s-6],a[s-4]),n.addAttributes(a[s-6],a[s-1]);break;case 13:n.addEntity(a[s-5],a[s-3]);break;case 14:n.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=n.Cardinality.ZERO_OR_ONE;break;case 35:this.$=n.Cardinality.ZERO_OR_MORE;break;case 36:this.$=n.Cardinality.ONE_OR_MORE;break;case 37:this.$=n.Cardinality.ONLY_ONE;break;case 38:this.$=n.Cardinality.MD_PARENT;break;case 39:this.$=n.Identification.NON_IDENTIFYING;break;case 40:this.$=n.Identification.IDENTIFYING;break}},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:9,20:r,22:d,24:l,26:p,27:h,28:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:d,24:l,26:p,27:h,28:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:u,42:f,43:E,44:m,45:g}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(_,[2,19]),t(_,[2,20]),t(e,[2,4]),{11:29,27:h,28:c},{16:30,17:[1,31],29:32,30:33,34:I},{11:35,27:h,28:c},{40:36,46:[1,37],47:[1,38]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:I},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:u,42:f,43:E,44:m,45:g},t(F,[2,39]),t(F,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(P,[2,23],{32:50,33:51,35:52,37:B,38:N}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(P,[2,24],{33:56,36:[1,57],38:N}),t(P,[2,25]),t(M,[2,29]),t(P,[2,32]),t(M,[2,31]),{16:58,17:[1,59],29:32,30:33,34:I},t(P,[2,26]),{35:60,37:B},{17:[1,61]},t(e,[2,13]),t(M,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(A,i){if(i.recoverable)this.trace(A);else{var o=new Error(A);throw o.hash=i,o}},parse:function(A){var i=this,o=[0],n=[],y=[null],a=[],x=this.table,s="",X=0,nt=0,dt=2,st=1,yt=a.slice.call(arguments,1),R=Object.create(this.lexer),W={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(W.yy[V]=this.yy[V]);R.setInput(A,W.yy),W.yy.lexer=R,W.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var J=R.yylloc;a.push(J);var pt=R.options&&R.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var Y;return Y=n.pop()||R.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(n=Y,Y=n.pop()),Y=i.symbols_[Y]||Y),Y}for(var w,U,v,q,z={},j,C,ot,G;;){if(U=o[o.length-1],this.defaultActions[U]?v=this.defaultActions[U]:((w===null||typeof w>"u")&&(w=_t()),v=x[U]&&x[U][w]),typeof v>"u"||!v.length||!v[0]){var tt="";G=[];for(j in x[U])this.terminals_[j]&&j>dt&&G.push("'"+this.terminals_[j]+"'");R.showPosition?tt="Parse error on line "+(X+1)+`:
2
- `+R.showPosition()+`
3
- Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":tt="Parse error on line "+(X+1)+": Unexpected "+(w==st?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(tt,{text:R.match,token:this.terminals_[w]||w,line:R.yylineno,loc:J,expected:G})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+w);switch(v[0]){case 1:o.push(w),y.push(R.yytext),a.push(R.yylloc),o.push(v[1]),w=null,nt=R.yyleng,s=R.yytext,X=R.yylineno,J=R.yylloc;break;case 2:if(C=this.productions_[v[1]][1],z.$=y[y.length-C],z._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},pt&&(z._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),q=this.performAction.apply(z,[s,nt,X,W.yy,v[1],y,a].concat(yt)),typeof q<"u")return q;C&&(o=o.slice(0,-1*C*2),y=y.slice(0,-1*C),a=a.slice(0,-1*C)),o.push(this.productions_[v[1]][0]),y.push(z.$),a.push(z._$),ot=x[o[o.length-2]][o[o.length-1]],o.push(ot);break;case 3:return!0}}return!0}},O=function(){var A={EOF:1,parseError:function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,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},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,n=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var y=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 a=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===y.length?this.yylloc.first_column:0)+y[y.length-n.length].length-n[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
- `+o+"^"},test_match:function(i,o){var n,y,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),y=i[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],n=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var x in a)this[x]=a[x];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,n,y;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),x=0;x<a.length;x++)if(n=this._input.match(this.rules[a[x]]),n&&(!o||n[0].length>o[0].length)){if(o=n,y=x,this.options.backtrack_lexer){if(i=this.test_match(n,a[x]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,a[y]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return i||this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},pushState:function(i){this.begin(i)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(i,o,n,y){switch(n){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return o.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return o.yytext[0];case 55:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return A}();k.lexer=O;function $(){this.yy={}}return $.prototype=k,k.Parser=$,new $}();at.parser=at;const Pt=at;let K={},it=[];const Kt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Wt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},ht=function(t,e=void 0){return K[t]===void 0?(K[t]={attributes:[],alias:e},H.info("Added new entity :",t)):K[t]&&!K[t].alias&&e&&(K[t].alias=e,H.info(`Add alias '${e}' to entity '${t}'`)),K[t]},Ut=()=>K,zt=function(t,e){let r=ht(t),d;for(d=e.length-1;d>=0;d--)r.attributes.push(e[d]),H.debug("Added attribute ",e[d].attributeName)},Ht=function(t,e,r,d){let l={entityA:t,roleA:e,entityB:r,relSpec:d};it.push(l),H.debug("Added new relationship :",l)},Qt=()=>it,Xt=function(){K={},it=[],Nt()},jt={Cardinality:Kt,Identification:Wt,getConfig:()=>Z().er,addEntity:ht,addAttributes:zt,getEntities:Ut,addRelationship:Ht,getRelationships:Qt,clear:Xt,setAccTitle:kt,getAccTitle:bt,setAccDescription:gt,getAccDescription:mt,setDiagramTitle:Et,getDiagramTitle:ft},L={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},Gt=function(t,e){let r;t.append("defs").append("marker").attr("id",L.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",L.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",L.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",L.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",L.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",L.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",L.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",L.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",L.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",L.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},D={ERMarkers:L,insertMarkers:Gt},Vt=/[^\dA-Za-z](\W)*/g;let b={},Q=new Map;const Jt=function(t){const e=Object.keys(t);for(const r of e)b[r]=t[r]},qt=(t,e,r)=>{const d=b.entityPadding/3,l=b.entityPadding/3,p=b.fontSize*.85,h=e.node().getBBox(),c=[];let u=!1,f=!1,E=0,m=0,g=0,_=0,I=h.height+d*2,S=1;r.forEach(N=>{N.attributeKeyTypeList!==void 0&&N.attributeKeyTypeList.length>0&&(u=!0),N.attributeComment!==void 0&&(f=!0)}),r.forEach(N=>{const M=`${e.node().id}-attr-${S}`;let k=0;const O=At(N.attributeType),$=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Z().fontFamily).style("font-size",p+"px").text(O),A=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Z().fontFamily).style("font-size",p+"px").text(N.attributeName),i={};i.tn=$,i.nn=A;const o=$.node().getBBox(),n=A.node().getBBox();if(E=Math.max(E,o.width),m=Math.max(m,n.width),k=Math.max(o.height,n.height),u){const y=N.attributeKeyTypeList!==void 0?N.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Z().fontFamily).style("font-size",p+"px").text(y);i.kn=a;const x=a.node().getBBox();g=Math.max(g,x.width),k=Math.max(k,x.height)}if(f){const y=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Z().fontFamily).style("font-size",p+"px").text(N.attributeComment||"");i.cn=y;const a=y.node().getBBox();_=Math.max(_,a.width),k=Math.max(k,a.height)}i.height=k,c.push(i),I+=k+d*2,S+=1});let F=4;u&&(F+=2),f&&(F+=2);const P=E+m+g+_,B={width:Math.max(b.minEntityWidth,Math.max(h.width+b.entityPadding*2,P+l*F)),height:r.length>0?I:Math.max(b.minEntityHeight,h.height+b.entityPadding*2)};if(r.length>0){const N=Math.max(0,(B.width-P-l*F)/(F/2));e.attr("transform","translate("+B.width/2+","+(d+h.height/2)+")");let M=h.height+d*2,k="attributeBoxOdd";c.forEach(O=>{const $=M+d+O.height/2;O.tn.attr("transform","translate("+l+","+$+")");const A=t.insert("rect","#"+O.tn.node().id).classed(`er ${k}`,!0).attr("x",0).attr("y",M).attr("width",E+l*2+N).attr("height",O.height+d*2),i=parseFloat(A.attr("x"))+parseFloat(A.attr("width"));O.nn.attr("transform","translate("+(i+l)+","+$+")");const o=t.insert("rect","#"+O.nn.node().id).classed(`er ${k}`,!0).attr("x",i).attr("y",M).attr("width",m+l*2+N).attr("height",O.height+d*2);let n=parseFloat(o.attr("x"))+parseFloat(o.attr("width"));if(u){O.kn.attr("transform","translate("+(n+l)+","+$+")");const y=t.insert("rect","#"+O.kn.node().id).classed(`er ${k}`,!0).attr("x",n).attr("y",M).attr("width",g+l*2+N).attr("height",O.height+d*2);n=parseFloat(y.attr("x"))+parseFloat(y.attr("width"))}f&&(O.cn.attr("transform","translate("+(n+l)+","+$+")"),t.insert("rect","#"+O.cn.node().id).classed(`er ${k}`,"true").attr("x",n).attr("y",M).attr("width",_+l*2+N).attr("height",O.height+d*2)),M+=O.height+d*2,k=k==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else B.height=Math.max(b.minEntityHeight,I),e.attr("transform","translate("+B.width/2+","+B.height/2+")");return B},te=function(t,e,r){const d=Object.keys(e);let l;return d.forEach(function(p){const h=se(p,"entity");Q.set(p,h);const c=t.append("g").attr("id",h);l=l===void 0?h:l;const u="text-"+h,f=c.append("text").classed("er entityLabel",!0).attr("id",u).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",Z().fontFamily).style("font-size",b.fontSize+"px").text(e[p].alias??p),{width:E,height:m}=qt(c,f,e[p].attributes),g=c.insert("rect","#"+u).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",E).attr("height",m).node().getBBox();r.setNode(h,{width:g.width,height:g.height,shape:"rect",id:h})}),l},ee=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},ut=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},re=function(t,e){return t.forEach(function(r){e.setEdge(Q.get(r.entityA),Q.get(r.entityB),{relationship:r},ut(r))}),t};let ct=0;const ae=function(t,e,r,d,l){ct++;const p=r.edge(Q.get(e.entityA),Q.get(e.entityB),ut(e)),h=xt().x(function(_){return _.x}).y(function(_){return _.y}).curve(Tt),c=t.insert("path","#"+d).classed("er relationshipLine",!0).attr("d",h(p.points)).style("stroke",b.stroke).style("fill","none");e.relSpec.relType===l.db.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");let u="";switch(b.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),e.relSpec.cardA){case l.db.Cardinality.ZERO_OR_ONE:c.attr("marker-end","url("+u+"#"+D.ERMarkers.ZERO_OR_ONE_END+")");break;case l.db.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+u+"#"+D.ERMarkers.ZERO_OR_MORE_END+")");break;case l.db.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+u+"#"+D.ERMarkers.ONE_OR_MORE_END+")");break;case l.db.Cardinality.ONLY_ONE:c.attr("marker-end","url("+u+"#"+D.ERMarkers.ONLY_ONE_END+")");break;case l.db.Cardinality.MD_PARENT:c.attr("marker-end","url("+u+"#"+D.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case l.db.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+u+"#"+D.ERMarkers.ZERO_OR_ONE_START+")");break;case l.db.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+u+"#"+D.ERMarkers.ZERO_OR_MORE_START+")");break;case l.db.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+u+"#"+D.ERMarkers.ONE_OR_MORE_START+")");break;case l.db.Cardinality.ONLY_ONE:c.attr("marker-start","url("+u+"#"+D.ERMarkers.ONLY_ONE_START+")");break;case l.db.Cardinality.MD_PARENT:c.attr("marker-start","url("+u+"#"+D.ERMarkers.MD_PARENT_START+")");break}const f=c.node().getTotalLength(),E=c.node().getPointAtLength(f*.5),m="rel"+ct,g=t.append("text").classed("er relationshipLabel",!0).attr("id",m).attr("x",E.x).attr("y",E.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",Z().fontFamily).style("font-size",b.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+m).classed("er relationshipLabelBox",!0).attr("x",E.x-g.width/2).attr("y",E.y-g.height/2).attr("width",g.width).attr("height",g.height)},ie=function(t,e,r,d){b=Z().er,H.info("Drawing ER diagram");const l=Z().securityLevel;let p;l==="sandbox"&&(p=et("#i"+e));const h=(l==="sandbox"?et(p.nodes()[0].contentDocument.body):et("body")).select(`[id='${e}']`);D.insertMarkers(h,b);let c;c=new Mt({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:b.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const u=te(h,d.db.getEntities(),c),f=re(d.db.getRelationships(),c);wt(c),ee(h,c),f.forEach(function(I){ae(h,I,c,u,d)});const E=b.diagramPadding;Ot.insertTitle(h,"entityTitleText",b.titleTopMargin,d.db.getDiagramTitle());const m=h.node().getBBox(),g=m.width+E*2,_=m.height+E*2;Rt(h,_,g,b.useMaxWidth),h.attr("viewBox",`${m.x-E} ${m.y-E} ${g} ${_}`)},ne="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function se(t="",e=""){const r=t.replace(Vt,"");return`${lt(e)}${lt(r)}${Ft(t,ne)}`}function lt(t=""){return t.length>0?`${t}-`:""}const oe={setConf:Jt,draw:ie},ce=t=>`
7
- .entityBox {
8
- fill: ${t.mainBkg};
9
- stroke: ${t.nodeBorder};
10
- }
11
-
12
- .attributeBoxOdd {
13
- fill: ${t.attributeBackgroundColorOdd};
14
- stroke: ${t.nodeBorder};
15
- }
16
-
17
- .attributeBoxEven {
18
- fill: ${t.attributeBackgroundColorEven};
19
- stroke: ${t.nodeBorder};
20
- }
21
-
22
- .relationshipLabelBox {
23
- fill: ${t.tertiaryColor};
24
- opacity: 0.7;
25
- background-color: ${t.tertiaryColor};
26
- rect {
27
- opacity: 0.5;
28
- }
29
- }
30
-
31
- .relationshipLine {
32
- stroke: ${t.lineColor};
33
- }
34
-
35
- .entityTitleText {
36
- text-anchor: middle;
37
- font-size: 18px;
38
- fill: ${t.textColor};
39
- }
40
- #MD_PARENT_START {
41
- fill: #f5f5f5 !important;
42
- stroke: ${t.lineColor} !important;
43
- stroke-width: 1;
44
- }
45
- #MD_PARENT_END {
46
- fill: #f5f5f5 !important;
47
- stroke: ${t.lineColor} !important;
48
- stroke-width: 1;
49
- }
50
-
51
- `,le=ce,ye={parser:Pt,db:jt,renderer:oe,styles:le};export{ye as diagram};
@@ -1,10 +0,0 @@
1
- import{j as Bt,M as mt,D as xt,L as vt,R as Lt,N as $t,aK as It,m as Rt,O as J1,E as ee,I as Nt,f as de,F as R1}from"./index-CBAg0_Do.js";var pe=function(){var t=function(j,a,l,n){for(l=l||{},n=j.length;n--;l[j[n]]=a);return l},r=[1,4],i=[1,3],u=[1,5],c=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],D=[2,2],d=[1,13],P=[1,14],g=[1,15],N=[1,16],H=[1,23],o1=[1,25],p1=[1,26],A1=[1,27],f=[1,49],T=[1,48],w1=[1,29],P1=[1,30],G1=[1,31],V1=[1,32],M1=[1,33],C=[1,44],_=[1,46],B=[1,42],m=[1,47],x=[1,43],v=[1,50],L=[1,45],$=[1,51],I=[1,52],U1=[1,34],K1=[1,35],X1=[1,36],Y1=[1,37],$1=[1,57],y=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Q=[1,61],J=[1,60],Z=[1,62],H1=[8,9,11,73,75],y1=[1,88],E1=[1,93],k1=[1,92],b1=[1,89],g1=[1,85],D1=[1,91],F1=[1,87],T1=[1,94],S1=[1,90],C1=[1,95],_1=[1,86],z1=[8,9,10,11,73,75],R=[8,9,10,11,44,73,75],M=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],fe=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],I1=[42,58,86,99,102,103,106,108,111,112,113],ye=[1,121],Ee=[1,120],ke=[1,128],be=[1,142],ge=[1,143],De=[1,144],Fe=[1,145],Te=[1,130],Se=[1,132],Ce=[1,136],_e=[1,137],Be=[1,138],me=[1,139],xe=[1,140],ve=[1,141],Le=[1,146],$e=[1,147],Ie=[1,126],Re=[1,127],Ne=[1,134],Oe=[1,129],we=[1,133],Pe=[1,131],ne=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Ge=[1,149],F=[8,9,11],U=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],o=[1,169],O=[1,165],w=[1,166],h=[1,170],p=[1,167],A=[1,168],B1=[75,113,116],E=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],Ve=[10,103],h1=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],q=[1,235],e1=[1,233],t1=[1,237],s1=[1,231],u1=[1,232],i1=[1,234],n1=[1,236],r1=[1,238],m1=[1,255],Me=[8,9,11,103],W=[8,9,10,11,58,81,102,103,106,107,108,109],re={trace:function(){},yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:function(j,a,l,n,k,e,G){var s=e.length-1;switch(k){case 2:this.$=[];break;case 3:(!Array.isArray(e[s])||e[s].length>0)&&e[s-1].push(e[s]),this.$=e[s-1];break;case 4:case 176:this.$=e[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(e[s-1]),this.$=e[s-1];break;case 27:this.$=e[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(e[s-6],e[s-1],e[s-4]);break;case 34:this.$=n.addSubGraph(e[s-3],e[s-1],e[s-3]);break;case 35:this.$=n.addSubGraph(void 0,e[s-1],void 0);break;case 37:this.$=e[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=e[s].trim(),n.setAccDescription(this.$);break;case 43:n.addLink(e[s-2].stmt,e[s],e[s-1]),this.$={stmt:e[s],nodes:e[s].concat(e[s-2].nodes)};break;case 44:n.addLink(e[s-3].stmt,e[s-1],e[s-2]),this.$={stmt:e[s-1],nodes:e[s-1].concat(e[s-3].nodes)};break;case 45:this.$={stmt:e[s-1],nodes:e[s-1]};break;case 46:this.$={stmt:e[s],nodes:e[s]};break;case 47:this.$=[e[s]];break;case 48:this.$=e[s-4].concat(e[s]);break;case 49:this.$=e[s];break;case 50:this.$=e[s-2],n.setClass(e[s-2],e[s]);break;case 51:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"square");break;case 52:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"doublecircle");break;case 53:this.$=e[s-5],n.addVertex(e[s-5],e[s-2],"circle");break;case 54:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"ellipse");break;case 55:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"stadium");break;case 56:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"subroutine");break;case 57:this.$=e[s-7],n.addVertex(e[s-7],e[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[s-5],e[s-3]]]));break;case 58:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"cylinder");break;case 59:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"round");break;case 60:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"diamond");break;case 61:this.$=e[s-5],n.addVertex(e[s-5],e[s-2],"hexagon");break;case 62:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"odd");break;case 63:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"trapezoid");break;case 64:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"inv_trapezoid");break;case 65:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"lean_right");break;case 66:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"lean_left");break;case 67:this.$=e[s],n.addVertex(e[s]);break;case 68:e[s-1].text=e[s],this.$=e[s-1];break;case 69:case 70:e[s-2].text=e[s-1],this.$=e[s-2];break;case 71:this.$=e[s];break;case 72:var K=n.destructLink(e[s],e[s-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,text:e[s-1]};break;case 73:this.$={text:e[s],type:"text"};break;case 74:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 75:this.$={text:e[s],type:"string"};break;case 76:this.$={text:e[s],type:"markdown"};break;case 77:var K=n.destructLink(e[s]);this.$={type:K.type,stroke:K.stroke,length:K.length};break;case 78:this.$=e[s-1];break;case 79:this.$={text:e[s],type:"text"};break;case 80:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 81:this.$={text:e[s],type:"string"};break;case 82:case 97:this.$={text:e[s],type:"markdown"};break;case 94:this.$={text:e[s],type:"text"};break;case 95:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 96:this.$={text:e[s],type:"text"};break;case 98:this.$=e[s-4],n.addClass(e[s-2],e[s]);break;case 99:this.$=e[s-4],n.setClass(e[s-2],e[s]);break;case 100:case 108:this.$=e[s-1],n.setClickEvent(e[s-1],e[s]);break;case 101:case 109:this.$=e[s-3],n.setClickEvent(e[s-3],e[s-2]),n.setTooltip(e[s-3],e[s]);break;case 102:this.$=e[s-2],n.setClickEvent(e[s-2],e[s-1],e[s]);break;case 103:this.$=e[s-4],n.setClickEvent(e[s-4],e[s-3],e[s-2]),n.setTooltip(e[s-4],e[s]);break;case 104:this.$=e[s-2],n.setLink(e[s-2],e[s]);break;case 105:this.$=e[s-4],n.setLink(e[s-4],e[s-2]),n.setTooltip(e[s-4],e[s]);break;case 106:this.$=e[s-4],n.setLink(e[s-4],e[s-2],e[s]);break;case 107:this.$=e[s-6],n.setLink(e[s-6],e[s-4],e[s]),n.setTooltip(e[s-6],e[s-2]);break;case 110:this.$=e[s-1],n.setLink(e[s-1],e[s]);break;case 111:this.$=e[s-3],n.setLink(e[s-3],e[s-2]),n.setTooltip(e[s-3],e[s]);break;case 112:this.$=e[s-3],n.setLink(e[s-3],e[s-2],e[s]);break;case 113:this.$=e[s-5],n.setLink(e[s-5],e[s-4],e[s]),n.setTooltip(e[s-5],e[s-2]);break;case 114:this.$=e[s-4],n.addVertex(e[s-2],void 0,void 0,e[s]);break;case 115:this.$=e[s-4],n.updateLink([e[s-2]],e[s]);break;case 116:this.$=e[s-4],n.updateLink(e[s-2],e[s]);break;case 117:this.$=e[s-8],n.updateLinkInterpolate([e[s-6]],e[s-2]),n.updateLink([e[s-6]],e[s]);break;case 118:this.$=e[s-8],n.updateLinkInterpolate(e[s-6],e[s-2]),n.updateLink(e[s-6],e[s]);break;case 119:this.$=e[s-6],n.updateLinkInterpolate([e[s-4]],e[s]);break;case 120:this.$=e[s-6],n.updateLinkInterpolate(e[s-4],e[s]);break;case 121:case 123:this.$=[e[s]];break;case 122:case 124:e[s-2].push(e[s]),this.$=e[s-2];break;case 126:this.$=e[s-1]+e[s];break;case 174:this.$=e[s];break;case 175:this.$=e[s-1]+""+e[s];break;case 177:this.$=e[s-1]+""+e[s];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,9:r,10:i,12:u},{1:[3]},t(c,D,{5:6}),{4:7,9:r,10:i,12:u},{4:8,9:r,10:i,12:u},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:d,9:P,10:g,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:H,33:24,34:o1,36:p1,38:A1,40:28,41:38,42:f,43:39,45:40,58:T,81:w1,82:P1,83:G1,84:V1,85:M1,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I,118:U1,119:K1,120:X1,121:Y1},t(c,[2,9]),t(c,[2,10]),t(c,[2,11]),{8:[1,54],9:[1,55],10:$1,15:53,18:56},t(y,[2,3]),t(y,[2,4]),t(y,[2,5]),t(y,[2,6]),t(y,[2,7]),t(y,[2,8]),{8:Q,9:J,11:Z,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:Q,9:J,11:Z,21:66},{8:Q,9:J,11:Z,21:67},{8:Q,9:J,11:Z,21:68},{8:Q,9:J,11:Z,21:69},{8:Q,9:J,11:Z,21:70},{8:Q,9:J,10:[1,71],11:Z,21:72},t(y,[2,36]),{35:[1,73]},{37:[1,74]},t(y,[2,39]),t(H1,[2,46],{18:75,10:$1}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:y1,42:E1,58:k1,77:[1,83],86:b1,92:[1,80],94:[1,81],98:82,102:g1,103:D1,106:F1,108:T1,111:S1,112:C1,113:_1,117:84},t(y,[2,178]),t(y,[2,179]),t(y,[2,180]),t(y,[2,181]),t(z1,[2,47]),t(z1,[2,49],{44:[1,96]}),t(R,[2,67],{110:109,29:[1,97],42:f,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:T,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:C,99:_,102:B,103:m,106:x,108:v,111:L,112:$,113:I}),t(M,[2,174]),t(M,[2,135]),t(M,[2,136]),t(M,[2,137]),t(M,[2,138]),t(M,[2,139]),t(M,[2,140]),t(M,[2,141]),t(M,[2,142]),t(M,[2,143]),t(M,[2,144]),t(M,[2,145]),t(c,[2,12]),t(c,[2,18]),t(c,[2,19]),{9:[1,110]},t(fe,[2,26],{18:111,10:$1}),t(y,[2,27]),{40:112,41:38,42:f,43:39,45:40,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},t(y,[2,40]),t(y,[2,41]),t(y,[2,42]),t(I1,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:ye,116:Ee},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(y,[2,28]),t(y,[2,29]),t(y,[2,30]),t(y,[2,31]),t(y,[2,32]),{10:ke,12:be,14:ge,27:De,28:122,32:Fe,42:Te,58:Se,73:Ce,77:[1,124],78:[1,125],80:135,81:_e,82:Be,83:me,84:xe,85:ve,86:Le,87:$e,88:123,102:Ie,106:Re,108:Ne,111:Oe,112:we,113:Pe},t(ne,D,{5:148}),t(y,[2,37]),t(y,[2,38]),t(H1,[2,45],{42:Ge}),{42:f,45:150,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},{99:[1,151],100:152,102:[1,153]},{42:f,45:154,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},{42:f,45:155,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},t(F,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(F,[2,108],{117:160,10:[1,159],14:y1,42:E1,58:k1,86:b1,102:g1,103:D1,106:F1,108:T1,111:S1,112:C1,113:_1}),t(F,[2,110],{10:[1,161]}),t(U,[2,176]),t(U,[2,163]),t(U,[2,164]),t(U,[2,165]),t(U,[2,166]),t(U,[2,167]),t(U,[2,168]),t(U,[2,169]),t(U,[2,170]),t(U,[2,171]),t(U,[2,172]),t(U,[2,173]),{42:f,45:162,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},{30:163,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:171,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:173,48:[1,172],65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:174,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:175,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:176,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{106:[1,177]},{30:178,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:179,63:[1,180],65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:181,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:182,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{30:183,65:o,77:O,78:w,79:164,113:h,114:p,115:A},t(M,[2,175]),t(c,[2,20]),t(fe,[2,25]),t(H1,[2,43],{18:184,10:$1}),t(I1,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{75:[1,188],76:189,113:ye,116:Ee},t(B1,[2,73]),t(B1,[2,75]),t(B1,[2,76]),t(B1,[2,161]),t(B1,[2,162]),{8:Q,9:J,10:ke,11:Z,12:be,14:ge,21:191,27:De,29:[1,190],32:Fe,42:Te,58:Se,73:Ce,80:135,81:_e,82:Be,83:me,84:xe,85:ve,86:Le,87:$e,88:192,102:Ie,106:Re,108:Ne,111:Oe,112:we,113:Pe},t(E,[2,94]),t(E,[2,96]),t(E,[2,97]),t(E,[2,150]),t(E,[2,151]),t(E,[2,152]),t(E,[2,153]),t(E,[2,154]),t(E,[2,155]),t(E,[2,156]),t(E,[2,157]),t(E,[2,158]),t(E,[2,159]),t(E,[2,160]),t(E,[2,83]),t(E,[2,84]),t(E,[2,85]),t(E,[2,86]),t(E,[2,87]),t(E,[2,88]),t(E,[2,89]),t(E,[2,90]),t(E,[2,91]),t(E,[2,92]),t(E,[2,93]),{6:11,7:12,8:d,9:P,10:g,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:H,32:[1,193],33:24,34:o1,36:p1,38:A1,40:28,41:38,42:f,43:39,45:40,58:T,81:w1,82:P1,83:G1,84:V1,85:M1,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I,118:U1,119:K1,120:X1,121:Y1},{10:$1,18:194},{10:[1,195],42:f,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:109,111:L,112:$,113:I},{10:[1,196]},{10:[1,197],103:[1,198]},t(Ve,[2,121]),{10:[1,199],42:f,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:109,111:L,112:$,113:I},{10:[1,200],42:f,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:109,111:L,112:$,113:I},{77:[1,201]},t(F,[2,102],{10:[1,202]}),t(F,[2,104],{10:[1,203]}),{77:[1,204]},t(U,[2,177]),{77:[1,205],95:[1,206]},t(z1,[2,50],{110:109,42:f,58:T,86:C,99:_,102:B,103:m,106:x,108:v,111:L,112:$,113:I}),{31:[1,207],65:o,79:208,113:h,114:p,115:A},t(h1,[2,79]),t(h1,[2,81]),t(h1,[2,82]),t(h1,[2,146]),t(h1,[2,147]),t(h1,[2,148]),t(h1,[2,149]),{47:[1,209],65:o,79:208,113:h,114:p,115:A},{30:210,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{49:[1,211],65:o,79:208,113:h,114:p,115:A},{51:[1,212],65:o,79:208,113:h,114:p,115:A},{53:[1,213],65:o,79:208,113:h,114:p,115:A},{55:[1,214],65:o,79:208,113:h,114:p,115:A},{58:[1,215]},{62:[1,216],65:o,79:208,113:h,114:p,115:A},{64:[1,217],65:o,79:208,113:h,114:p,115:A},{30:218,65:o,77:O,78:w,79:164,113:h,114:p,115:A},{31:[1,219],65:o,79:208,113:h,114:p,115:A},{65:o,67:[1,220],69:[1,221],79:208,113:h,114:p,115:A},{65:o,67:[1,223],69:[1,222],79:208,113:h,114:p,115:A},t(H1,[2,44],{42:Ge}),t(I1,[2,70]),t(I1,[2,69]),{60:[1,224],65:o,79:208,113:h,114:p,115:A},t(I1,[2,72]),t(B1,[2,74]),{30:225,65:o,77:O,78:w,79:164,113:h,114:p,115:A},t(ne,D,{5:226}),t(E,[2,95]),t(y,[2,35]),{41:227,42:f,43:39,45:40,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},{10:q,58:e1,81:t1,89:228,102:s1,104:229,105:230,106:u1,107:i1,108:n1,109:r1},{10:q,58:e1,81:t1,89:239,101:[1,240],102:s1,104:229,105:230,106:u1,107:i1,108:n1,109:r1},{10:q,58:e1,81:t1,89:241,101:[1,242],102:s1,104:229,105:230,106:u1,107:i1,108:n1,109:r1},{102:[1,243]},{10:q,58:e1,81:t1,89:244,102:s1,104:229,105:230,106:u1,107:i1,108:n1,109:r1},{42:f,45:245,58:T,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I},t(F,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(F,[2,109]),t(F,[2,111],{10:[1,249]}),t(F,[2,112]),t(R,[2,51]),t(h1,[2,80]),t(R,[2,52]),{49:[1,250],65:o,79:208,113:h,114:p,115:A},t(R,[2,59]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),{106:[1,251]},t(R,[2,58]),t(R,[2,60]),{64:[1,252],65:o,79:208,113:h,114:p,115:A},t(R,[2,62]),t(R,[2,63]),t(R,[2,65]),t(R,[2,64]),t(R,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:o,79:208,113:h,114:p,115:A},{6:11,7:12,8:d,9:P,10:g,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:H,32:[1,254],33:24,34:o1,36:p1,38:A1,40:28,41:38,42:f,43:39,45:40,58:T,81:w1,82:P1,83:G1,84:V1,85:M1,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I,118:U1,119:K1,120:X1,121:Y1},t(z1,[2,48]),t(F,[2,114],{103:m1}),t(Me,[2,123],{105:256,10:q,58:e1,81:t1,102:s1,106:u1,107:i1,108:n1,109:r1}),t(W,[2,125]),t(W,[2,127]),t(W,[2,128]),t(W,[2,129]),t(W,[2,130]),t(W,[2,131]),t(W,[2,132]),t(W,[2,133]),t(W,[2,134]),t(F,[2,115],{103:m1}),{10:[1,257]},t(F,[2,116],{103:m1}),{10:[1,258]},t(Ve,[2,122]),t(F,[2,98],{103:m1}),t(F,[2,99],{110:109,42:f,58:T,86:C,99:_,102:B,103:m,106:x,108:v,111:L,112:$,113:I}),t(F,[2,103]),t(F,[2,105],{10:[1,259]}),t(F,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:Q,9:J,11:Z,21:264},t(y,[2,34]),{10:q,58:e1,81:t1,102:s1,104:265,105:230,106:u1,107:i1,108:n1,109:r1},t(W,[2,126]),{14:y1,42:E1,58:k1,86:b1,98:266,102:g1,103:D1,106:F1,108:T1,111:S1,112:C1,113:_1,117:84},{14:y1,42:E1,58:k1,86:b1,98:267,102:g1,103:D1,106:F1,108:T1,111:S1,112:C1,113:_1,117:84},{95:[1,268]},t(F,[2,113]),t(R,[2,53]),{30:269,65:o,77:O,78:w,79:164,113:h,114:p,115:A},t(R,[2,61]),t(ne,D,{5:270}),t(Me,[2,124],{105:256,10:q,58:e1,81:t1,102:s1,106:u1,107:i1,108:n1,109:r1}),t(F,[2,119],{117:160,10:[1,271],14:y1,42:E1,58:k1,86:b1,102:g1,103:D1,106:F1,108:T1,111:S1,112:C1,113:_1}),t(F,[2,120],{117:160,10:[1,272],14:y1,42:E1,58:k1,86:b1,102:g1,103:D1,106:F1,108:T1,111:S1,112:C1,113:_1}),t(F,[2,107]),{31:[1,273],65:o,79:208,113:h,114:p,115:A},{6:11,7:12,8:d,9:P,10:g,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:H,32:[1,274],33:24,34:o1,36:p1,38:A1,40:28,41:38,42:f,43:39,45:40,58:T,81:w1,82:P1,83:G1,84:V1,85:M1,86:C,99:_,102:B,103:m,106:x,108:v,110:41,111:L,112:$,113:I,118:U1,119:K1,120:X1,121:Y1},{10:q,58:e1,81:t1,89:275,102:s1,104:229,105:230,106:u1,107:i1,108:n1,109:r1},{10:q,58:e1,81:t1,89:276,102:s1,104:229,105:230,106:u1,107:i1,108:n1,109:r1},t(R,[2,57]),t(y,[2,33]),t(F,[2,117],{103:m1}),t(F,[2,118],{103:m1})],defaultActions:{},parseError:function(j,a){if(a.recoverable)this.trace(j);else{var l=new Error(j);throw l.hash=a,l}},parse:function(j){var a=this,l=[0],n=[],k=[null],e=[],G=this.table,s="",K=0,Ue=0,Tt=2,Ke=1,St=e.slice.call(arguments,1),S=Object.create(this.lexer),d1={yy:{}};for(var ce in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ce)&&(d1.yy[ce]=this.yy[ce]);S.setInput(j,d1.yy),d1.yy.lexer=S,d1.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var le=S.yylloc;e.push(le);var Ct=S.options&&S.options.ranges;typeof d1.yy.parseError=="function"?this.parseError=d1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var c1;return c1=n.pop()||S.lex()||Ke,typeof c1!="number"&&(c1 instanceof Array&&(n=c1,c1=n.pop()),c1=a.symbols_[c1]||c1),c1}for(var V,f1,X,oe,x1={},W1,a1,Xe,j1;;){if(f1=l[l.length-1],this.defaultActions[f1]?X=this.defaultActions[f1]:((V===null||typeof V>"u")&&(V=_t()),X=G[f1]&&G[f1][V]),typeof X>"u"||!X.length||!X[0]){var he="";j1=[];for(W1 in G[f1])this.terminals_[W1]&&W1>Tt&&j1.push("'"+this.terminals_[W1]+"'");S.showPosition?he="Parse error on line "+(K+1)+`:
2
- `+S.showPosition()+`
3
- Expecting `+j1.join(", ")+", got '"+(this.terminals_[V]||V)+"'":he="Parse error on line "+(K+1)+": Unexpected "+(V==Ke?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(he,{text:S.match,token:this.terminals_[V]||V,line:S.yylineno,loc:le,expected:j1})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f1+", token: "+V);switch(X[0]){case 1:l.push(V),k.push(S.yytext),e.push(S.yylloc),l.push(X[1]),V=null,Ue=S.yyleng,s=S.yytext,K=S.yylineno,le=S.yylloc;break;case 2:if(a1=this.productions_[X[1]][1],x1.$=k[k.length-a1],x1._$={first_line:e[e.length-(a1||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(a1||1)].first_column,last_column:e[e.length-1].last_column},Ct&&(x1._$.range=[e[e.length-(a1||1)].range[0],e[e.length-1].range[1]]),oe=this.performAction.apply(x1,[s,Ue,K,d1.yy,X[1],k,e].concat(St)),typeof oe<"u")return oe;a1&&(l=l.slice(0,-1*a1*2),k=k.slice(0,-1*a1),e=e.slice(0,-1*a1)),l.push(this.productions_[X[1]][0]),k.push(x1.$),e.push(x1._$),Xe=G[l[l.length-2]][l[l.length-1]],l.push(Xe);break;case 3:return!0}}return!0}},Ft=function(){var j={EOF:1,parseError:function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},setInput:function(a,l){return this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var l=a.length,n=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var k=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 e=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===k.length?this.yylloc.first_column:0)+k[k.length-n.length].length-n[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),l=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
5
- `+l+"^"},test_match:function(a,l){var n,k,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),k=a[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],n=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var G in e)this[G]=e[G];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,l,n,k;this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),G=0;G<e.length;G++)if(n=this._input.match(this.rules[e[G]]),n&&(!l||n[0].length>l[0].length)){if(l=n,k=G,this.options.backtrack_lexer){if(a=this.test_match(n,e[G]),a!==!1)return a;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(a=this.test_match(l,e[k]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(a,l,n,k){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 11:this.popState();break;case 12:return 93;case 13:return"MD_STR";case 14:this.popState();break;case 15:this.begin("md_string");break;case 16:return"STR";case 17:this.popState();break;case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 27:this.popState();break;case 28:return 85;case 29:return a.lex.firstGraph()&&this.begin("dir"),12;case 30:return a.lex.firstGraph()&&this.begin("dir"),12;case 31:return a.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:return 95;case 35:return 95;case 36:return 95;case 37:return 95;case 38:return this.popState(),13;case 39:return this.popState(),14;case 40:return this.popState(),14;case 41:return this.popState(),14;case 42:return this.popState(),14;case 43:return this.popState(),14;case 44:return this.popState(),14;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:return 108;case 55:return 44;case 56:return 58;case 57:return 42;case 58:return 8;case 59:return 103;case 60:return 112;case 61:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:return 116;case 64:return this.popState(),75;case 65:return this.pushState("thickEdgeText"),73;case 66:return 116;case 67:return this.popState(),75;case 68:return this.pushState("dottedEdgeText"),73;case 69:return 116;case 70:return 75;case 71:return this.popState(),51;case 72:return"TEXT";case 73:return this.pushState("ellipseText"),50;case 74:return this.popState(),53;case 75:return this.pushState("text"),52;case 76:return this.popState(),55;case 77:return this.pushState("text"),54;case 78:return 56;case 79:return this.pushState("text"),65;case 80:return this.popState(),62;case 81:return this.pushState("text"),61;case 82:return this.popState(),47;case 83:return this.pushState("text"),46;case 84:return this.popState(),67;case 85:return this.popState(),69;case 86:return 114;case 87:return this.pushState("trapText"),66;case 88:return this.pushState("trapText"),68;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 94:return 112;case 95:return 108;case 96:return 42;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;case 101:return this.pushState("text"),60;case 102:return this.popState(),49;case 103:return this.pushState("text"),48;case 104:return this.popState(),31;case 105:return this.pushState("text"),29;case 106:return this.popState(),64;case 107:return this.pushState("text"),63;case 108:return"TEXT";case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}},rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};return j}();re.lexer=Ft;function ae(){this.yy={}}return ae.prototype=re,re.Parser=ae,new ae}();pe.parser=pe;const Yt=pe,Ot="flowchart-";let Ye=0,L1=ee(),b={},z=[],v1={},l1=[],Z1={},q1={},Q1=0,Ae=!0,Y,te,se=[];const ue=t=>Rt.sanitizeText(t,L1),O1=function(t){const r=Object.keys(b);for(const i of r)if(b[i].id===t)return b[i].domId;return t},He=function(t,r,i,u,c,D,d={}){let P,g=t;g!==void 0&&g.trim().length!==0&&(b[g]===void 0&&(b[g]={id:g,labelType:"text",domId:Ot+g+"-"+Ye,styles:[],classes:[]}),Ye++,r!==void 0?(L1=ee(),P=ue(r.text.trim()),b[g].labelType=r.type,P[0]==='"'&&P[P.length-1]==='"'&&(P=P.substring(1,P.length-1)),b[g].text=P):b[g].text===void 0&&(b[g].text=t),i!==void 0&&(b[g].type=i),u!=null&&u.forEach(function(N){b[g].styles.push(N)}),c!=null&&c.forEach(function(N){b[g].classes.push(N)}),D!==void 0&&(b[g].dir=D),b[g].props===void 0?b[g].props=d:d!==void 0&&Object.assign(b[g].props,d))},ze=function(t,r,i){const u={start:t,end:r,type:void 0,text:"",labelType:"text"};J1.info("abc78 Got edge...",u);const c=i.text;if(c!==void 0&&(u.text=ue(c.text.trim()),u.text[0]==='"'&&u.text[u.text.length-1]==='"'&&(u.text=u.text.substring(1,u.text.length-1)),u.labelType=c.type),i!==void 0&&(u.type=i.type,u.stroke=i.stroke,u.length=i.length),(u==null?void 0:u.length)>10&&(u.length=10),z.length<(L1.maxEdges??500))J1.info("abc78 pushing edge..."),z.push(u);else throw new Error(`Edge limit exceeded. ${z.length} edges found, but the limit is ${L1.maxEdges}.
7
-
8
- Initialize mermaid with maxEdges set to a higher number to allow more edges.
9
- You cannot set this config via configuration inside the diagram as it is a secure config.
10
- You have to call mermaid.initialize.`)},We=function(t,r,i){J1.info("addLink (abc78)",t,r,i);let u,c;for(u=0;u<t.length;u++)for(c=0;c<r.length;c++)ze(t[u],r[c],i)},je=function(t,r){t.forEach(function(i){i==="default"?z.defaultInterpolate=r:z[i].interpolate=r})},Qe=function(t,r){t.forEach(function(i){if(i>=z.length)throw new Error(`The index ${i} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${z.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);i==="default"?z.defaultStyle=r:(de.isSubstringInArray("fill",r)===-1&&r.push("fill:none"),z[i].style=r)})},Je=function(t,r){t.split(",").forEach(function(i){v1[i]===void 0&&(v1[i]={id:i,styles:[],textStyles:[]}),r!=null&&r.forEach(function(u){if(u.match("color")){const c=u.replace("fill","bgFill").replace("color","fill");v1[i].textStyles.push(c)}v1[i].styles.push(u)})})},Ze=function(t){Y=t,Y.match(/.*</)&&(Y="RL"),Y.match(/.*\^/)&&(Y="BT"),Y.match(/.*>/)&&(Y="LR"),Y.match(/.*v/)&&(Y="TB"),Y==="TD"&&(Y="TB")},ie=function(t,r){t.split(",").forEach(function(i){let u=i;b[u]!==void 0&&b[u].classes.push(r),Z1[u]!==void 0&&Z1[u].classes.push(r)})},wt=function(t,r){t.split(",").forEach(function(i){r!==void 0&&(q1[te==="gen-1"?O1(i):i]=ue(r))})},Pt=function(t,r,i){let u=O1(t);if(ee().securityLevel!=="loose"||r===void 0)return;let c=[];if(typeof i=="string"){c=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let D=0;D<c.length;D++){let d=c[D].trim();d.charAt(0)==='"'&&d.charAt(d.length-1)==='"'&&(d=d.substr(1,d.length-2)),c[D]=d}}c.length===0&&c.push(t),b[t]!==void 0&&(b[t].haveCallback=!0,se.push(function(){const D=document.querySelector(`[id="${u}"]`);D!==null&&D.addEventListener("click",function(){de.runFunc(r,...c)},!1)}))},qe=function(t,r,i){t.split(",").forEach(function(u){b[u]!==void 0&&(b[u].link=de.formatUrl(r,L1),b[u].linkTarget=i)}),ie(t,"clickable")},et=function(t){if(q1.hasOwnProperty(t))return q1[t]},tt=function(t,r,i){t.split(",").forEach(function(u){Pt(u,r,i)}),ie(t,"clickable")},st=function(t){se.forEach(function(r){r(t)})},ut=function(){return Y.trim()},it=function(){return b},nt=function(){return z},rt=function(){return v1},at=function(t){let r=R1(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=R1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),R1(t).select("svg").selectAll("g.node").on("mouseover",function(){const i=R1(this);if(i.attr("title")===null)return;const u=this.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(i.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),R1(this).classed("hover",!1)})};se.push(at);const ct=function(t="gen-1"){b={},v1={},z=[],se=[at],l1=[],Z1={},Q1=0,q1={},Ae=!0,te=t,L1=ee(),Nt()},lt=t=>{te=t||"gen-2"},ot=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},ht=function(t,r,i){let u=t.text.trim(),c=i.text;t===i&&i.text.match(/\s/)&&(u=void 0);function D(H){const o1={boolean:{},number:{},string:{}},p1=[];let A1;return{nodeList:H.filter(function(f){const T=typeof f;return f.stmt&&f.stmt==="dir"?(A1=f.value,!1):f.trim()===""?!1:T in o1?o1[T].hasOwnProperty(f)?!1:o1[T][f]=!0:p1.includes(f)?!1:p1.push(f)}),dir:A1}}let d=[];const{nodeList:P,dir:g}=D(d.concat.apply(d,r));if(d=P,te==="gen-1")for(let H=0;H<d.length;H++)d[H]=O1(d[H]);u=u||"subGraph"+Q1,c=c||"",c=ue(c),Q1=Q1+1;const N={id:u,nodes:d,title:c.trim(),classes:[],dir:g,labelType:i.type};return J1.info("Adding",N.id,N.nodes,N.dir),N.nodes=gt(N,l1).nodes,l1.push(N),Z1[u]=N,u},Gt=function(t){for(const[r,i]of l1.entries())if(i.id===t)return r;return-1};let N1=-1;const pt=[],At=function(t,r){const i=l1[r].nodes;if(N1=N1+1,N1>2e3)return;if(pt[N1]=r,l1[r].id===t)return{result:!0,count:0};let u=0,c=1;for(;u<i.length;){const D=Gt(i[u]);if(D>=0){const d=At(t,D);if(d.result)return{result:!0,count:c+d.count};c=c+d.count}u=u+1}return{result:!1,count:c}},dt=function(t){return pt[t]},ft=function(){N1=-1,l1.length>0&&At("none",l1.length-1)},yt=function(){return l1},Et=()=>Ae?(Ae=!1,!0):!1,Vt=t=>{let r=t.trim(),i="arrow_open";switch(r[0]){case"<":i="arrow_point",r=r.slice(1);break;case"x":i="arrow_cross",r=r.slice(1);break;case"o":i="arrow_circle",r=r.slice(1);break}let u="normal";return r.includes("=")&&(u="thick"),r.includes(".")&&(u="dotted"),{type:i,stroke:u}},Mt=(t,r)=>{const i=r.length;let u=0;for(let c=0;c<i;++c)r[c]===t&&++u;return u},Ut=t=>{const r=t.trim();let i=r.slice(0,-1),u="arrow_open";switch(r.slice(-1)){case"x":u="arrow_cross",r[0]==="x"&&(u="double_"+u,i=i.slice(1));break;case">":u="arrow_point",r[0]==="<"&&(u="double_"+u,i=i.slice(1));break;case"o":u="arrow_circle",r[0]==="o"&&(u="double_"+u,i=i.slice(1));break}let c="normal",D=i.length-1;i[0]==="="&&(c="thick"),i[0]==="~"&&(c="invisible");let d=Mt(".",i);return d&&(c="dotted",D=d),{type:u,stroke:c,length:D}},kt=(t,r)=>{const i=Ut(t);let u;if(r){if(u=Vt(r),u.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(u.type==="arrow_open")u.type=i.type;else{if(u.type!==i.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return u.type==="double_arrow"&&(u.type="double_arrow_point"),u.length=i.length,u}return i},bt=(t,r)=>{let i=!1;return t.forEach(u=>{u.nodes.indexOf(r)>=0&&(i=!0)}),i},gt=(t,r)=>{const i=[];return t.nodes.forEach((u,c)=>{bt(r,u)||i.push(t.nodes[c])}),{nodes:i}},Dt={firstGraph:Et},Kt={defaultConfig:()=>It.flowchart,setAccTitle:$t,getAccTitle:Lt,getAccDescription:vt,setAccDescription:xt,addVertex:He,lookUpDomId:O1,addLink:We,updateLinkInterpolate:je,updateLink:Qe,addClass:Je,setDirection:Ze,setClass:ie,setTooltip:wt,getTooltip:et,setClickEvent:tt,setLink:qe,bindFunctions:st,getDirection:ut,getVertices:it,getEdges:nt,getClasses:rt,clear:ct,setGen:lt,defaultStyle:ot,addSubGraph:ht,getDepthFirstPos:dt,indexNodes:ft,getSubGraphs:yt,destructLink:kt,lex:Dt,exists:bt,makeUniq:gt,setDiagramTitle:mt,getDiagramTitle:Bt},Ht=Object.freeze(Object.defineProperty({__proto__:null,addClass:Je,addLink:We,addSingleLink:ze,addSubGraph:ht,addVertex:He,bindFunctions:st,clear:ct,default:Kt,defaultStyle:ot,destructLink:kt,firstGraph:Et,getClasses:rt,getDepthFirstPos:dt,getDirection:ut,getEdges:nt,getSubGraphs:yt,getTooltip:et,getVertices:it,indexNodes:ft,lex:Dt,lookUpDomId:O1,setClass:ie,setClickEvent:tt,setDirection:Ze,setGen:lt,setLink:qe,updateLink:Qe,updateLinkInterpolate:je},Symbol.toStringTag,{value:"Module"}));export{Ht as H,Yt as X,Kt as j};